Skip to content

Commit 8fac36b

Browse files
committed
ci: fix msrv checks
1 parent e94be74 commit 8fac36b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/functions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ fn test_impl_trait_arg() {
147147
);
148148
}
149149

150+
#[allow(unused)]
150151
#[test]
151152
#[deny(clippy::used_underscore_binding)]
152153
fn test_unbound_parameters_clippy() {

tests/issues.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ fn gl_issue_16() {
2929
fn insertion_sort(&mut self);
3030
}
3131

32+
// TODO(MSRV 1.82): remove and use std's [T].is_sorted()
33+
fn is_sorted<T: Ord>(s: &[T]) -> bool {
34+
s.windows(2).all(|w| w[0] <= w[1])
35+
}
36+
3237
impl<T: Ord + Debug> Sortable<T> for Vec<T> {
33-
#[debug_ensures(self.is_sorted())]
38+
#[debug_ensures(is_sorted(self))]
3439
fn insertion_sort(&mut self) {
3540
assert!(self[0] < self[1]);
3641
}

0 commit comments

Comments
 (0)