From 6eb00b3f4cf10643ff34595c28e6b41900ba6ea9 Mon Sep 17 00:00:00 2001 From: Beta Date: Sun, 3 Mar 2024 02:53:51 +0000 Subject: [PATCH] FMT --- prost-types/src/lib.rs | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/prost-types/src/lib.rs b/prost-types/src/lib.rs index 2d8d6cd59..f41dac750 100644 --- a/prost-types/src/lib.rs +++ b/prost-types/src/lib.rs @@ -919,17 +919,35 @@ mod tests { #[test] fn check_timestamp_ord() { - let earlier_timestamp = Timestamp { seconds: 10, nanos: 500 }; - let later_timestamp = Timestamp { seconds: 10, nanos: 700 }; - let equal_timestamp = Timestamp { seconds: 10, nanos: 500 }; + let earlier_timestamp = Timestamp { + seconds: 10, + nanos: 500, + }; + let later_timestamp = Timestamp { + seconds: 10, + nanos: 700, + }; + let equal_timestamp = Timestamp { + seconds: 10, + nanos: 500, + }; assert!(earlier_timestamp < later_timestamp); assert!(earlier_timestamp <= later_timestamp); assert!(later_timestamp > earlier_timestamp); assert!(later_timestamp >= earlier_timestamp); - assert_eq!(earlier_timestamp.cmp(&later_timestamp), std::cmp::Ordering::Less); - assert_eq!(later_timestamp.cmp(&earlier_timestamp), std::cmp::Ordering::Greater); - assert_eq!(equal_timestamp.cmp(&earlier_timestamp), std::cmp::Ordering::Equal); + assert_eq!( + earlier_timestamp.cmp(&later_timestamp), + std::cmp::Ordering::Less + ); + assert_eq!( + later_timestamp.cmp(&earlier_timestamp), + std::cmp::Ordering::Greater + ); + assert_eq!( + equal_timestamp.cmp(&earlier_timestamp), + std::cmp::Ordering::Equal + ); } }