fix a warning in arbitrary support

This commit is contained in:
KodrAus 2023-06-27 11:12:03 +10:00
parent 646bd98e9b
commit 759c971f09
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ impl Arbitrary<'_> for Uuid {
Ok(Builder::from_random_bytes(b).into_uuid())
}
fn size_hint(depth: usize) -> (usize, Option<usize>) {
fn size_hint(_: usize) -> (usize, Option<usize>) {
(16, Some(16))
}
}

View File

@ -428,10 +428,11 @@ mod tests {
use super::*;
#[test]
fn rfc4122_unix_wraps() {
fn rfc4122_unix_does_not_panic() {
// Ensure timestamp conversions never panic
Timestamp::unix_to_rfc4122_ticks(u64::MAX, 0);
Timestamp::unix_to_rfc4122_ticks(0, u32::MAX);
Timestamp::unix_to_rfc4122_ticks(u64::MAX, u32::MAX);
Timestamp::rfc4122_to_unix(u64::MAX);
}