According to the documentation for jiff 0.2.35, Timestamp::from_nanosecond returns an error if the given nanosecond corresponds to a timestamp outside of the Timestamp::MIN and Timestamp::MAX boundaries, but in reality, it panics.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=c02ff9f67dcd030ca1b2e3181b1b24c6
let min = Timestamp::MIN.as_nanosecond();
let _ = Timestamp::from_nanosecond(min - 1);
thread 'main' (61) panicked at /playground/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-core-0.1.0/src/timestamp.rs:103:9:
assertion failed: secs != b::UnixEpochSeconds::MIN || nanos >= 0
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=05bb30d0c763a64980bbc5040e22a5f5
let max = Timestamp::MAX.as_nanosecond();
let _ = Timestamp::from_nanosecond(max + 1);
thread 'main' (14) panicked at /playground/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-core-0.1.0/src/timestamp.rs:101:9:
assertion failed: b::UnixEpochSeconds::checkc(secs).is_ok()
According to the documentation for jiff 0.2.35,
Timestamp::from_nanosecondreturns an error if the given nanosecond corresponds to a timestamp outside of theTimestamp::MINandTimestamp::MAXboundaries, but in reality, it panics.https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=c02ff9f67dcd030ca1b2e3181b1b24c6
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=05bb30d0c763a64980bbc5040e22a5f5