We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e98d45c commit d752f90Copy full SHA for d752f90
lightning/src/util/persist.rs
@@ -672,13 +672,6 @@ mod tests {
672
assert!(persister.kv.remove("namespace", "key",).is_err());
673
}
674
675
- fn is_sorted<T>(data: &[T]) -> bool
676
- where
677
- T: Ord,
678
- {
679
- data.windows(2).all(|w| w[0] <= w[1])
680
- }
681
-
682
// =================================
683
// TESTS
684
@@ -794,7 +787,7 @@ mod tests {
794
787
// Check that we get the right number of updates, in order
795
788
let listed_update_names = persister.list_update_names(&monitor_name).unwrap();
796
789
assert_eq!(listed_update_names.len(), 999);
797
- assert!(is_sorted(&listed_update_names));
790
+ assert!(&listed_update_names.windows(2).all(|w| w[0] <= w[1]));
798
791
799
792
800
793
#[test]
0 commit comments