subms-timer-wheel 0.10.0

submillisecond.com cookbook recipe - concurrency: subms-timer-wheel. Single-level hashed timer wheel with O(1) schedule and cancel.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

#[test]
fn delay_too_long_displays_both_numbers() {
    let e = TimerError::DelayTooLong { delay: 99, max: 64 };
    let s = e.to_string();
    assert!(s.contains("99"), "{s}");
    assert!(s.contains("64"), "{s}");
}

#[test]
fn implements_std_error() {
    let e = TimerError::DelayTooLong { delay: 1, max: 0 };
    let boxed: Box<dyn std::error::Error> = Box::new(e);
    assert!(boxed.source().is_none());
}