Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time after panicking on leap day #121

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Fix time after panicking on leap day #121

merged 2 commits into from
Feb 29, 2024

Commits on Feb 29, 2024

  1. Add a failing test case for leap day

    ---- schedule::test::test_no_panic_on_leap_day_time_after stdout ----
    thread 'schedule::test::test_no_panic_on_leap_day_time_after' panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/search.rs:118:21:
    range start is greater than range end in BTreeSet
    stack backtrace:
       0: rust_begin_unwind
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
       1: core::panicking::panic_fmt
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
       2: alloc::collections::btree::search::<impl alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>>::search_tree_for_bifurcation
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/search.rs:118:21
       3: alloc::collections::btree::navigate::<impl alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>>::find_leaf_edges_spanning_range
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/navigate.rs:274:15
       4: alloc::collections::btree::navigate::<impl alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Immut,K,V,alloc::collections::btree::node::marker::LeafOrInternal>>::range_search
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/navigate.rs:324:18
       5: alloc::collections::btree::map::BTreeMap<K,V,A>::range
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/map.rs:1208:44
       6: alloc::collections::btree::set::BTreeSet<T,A>::range
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/collections/btree/set.rs:399:23
       7: cron::schedule::Schedule::next_after
                 at ./src/schedule.rs:59:48
       8: <cron::schedule::ScheduleIterator<Z> as core::iter::traits::iterator::Iterator>::next
                 at ./src/schedule.rs:375:29
       9: cron::schedule::test::test_no_panic_on_leap_day_time_after
                 at ./src/schedule.rs:646:20
      10: cron::schedule::test::test_no_panic_on_leap_day_time_after::{{closure}}
                 at ./src/schedule.rs:643:46
      11: core::ops::function::FnOnce::call_once
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
      12: core::ops::function::FnOnce::call_once
                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    messense committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    ba0f5cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    45292bb View commit details
    Browse the repository at this point in the history