We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9b8f5b + 24aa45c commit 9d21b5aCopy full SHA for 9d21b5a
library/core/tests/slice.rs
@@ -739,6 +739,10 @@ fn test_array_windows_count() {
739
let v3: &[i32] = &[];
740
let c3 = v3.array_windows::<2>();
741
assert_eq!(c3.count(), 0);
742
+
743
+ let v4: &[()] = &[(); usize::MAX];
744
+ let c4 = v4.array_windows::<1>();
745
+ assert_eq!(c4.count(), usize::MAX);
746
}
747
748
#[test]
@@ -1050,6 +1054,10 @@ fn test_windows_count() {
1050
1054
1051
1055
let c3 = v3.windows(2);
1052
1056
1057
1058
+ let v4 = &[(); usize::MAX];
1059
+ let c4 = v4.windows(1);
1060
1053
1061
1062
1063
0 commit comments