formatting
All checks were successful
Rust/spacepackets/pipeline/pr-main This commit looks good
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2024-03-18 13:39:08 +01:00
parent 3fc95f0927
commit 8161e59ba1
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -1196,17 +1196,13 @@ mod tests {
#[test]
fn test_small_fraction_floored_to_zero() {
let fractions =
fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 59)
.unwrap();
let fractions = fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 59).unwrap();
assert_eq!(fractions.1, 0);
}
#[test]
fn test_small_fraction_becomes_fractional_part() {
let fractions =
fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 61)
.unwrap();
let fractions = fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 61).unwrap();
assert_eq!(fractions.1, 1);
}
@ -1229,8 +1225,7 @@ mod tests {
#[test]
fn test_smallest_resolution_large_nanoseconds_becomes_largest_fraction() {
let fractions =
fractional_part_from_subsec_ns(FractionalResolution::FourMs, 10u64.pow(9) - 1)
.unwrap();
fractional_part_from_subsec_ns(FractionalResolution::FourMs, 10u64.pow(9) - 1).unwrap();
assert_eq!(fractions.1, 2_u32.pow(8) - 1);
}