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.
1 parent e94be74 commit 8fac36bCopy full SHA for 8fac36b
tests/functions.rs
@@ -147,6 +147,7 @@ fn test_impl_trait_arg() {
147
);
148
}
149
150
+#[allow(unused)]
151
#[test]
152
#[deny(clippy::used_underscore_binding)]
153
fn test_unbound_parameters_clippy() {
tests/issues.rs
@@ -29,8 +29,13 @@ fn gl_issue_16() {
29
fn insertion_sort(&mut self);
30
31
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
+
37
impl<T: Ord + Debug> Sortable<T> for Vec<T> {
- #[debug_ensures(self.is_sorted())]
38
+ #[debug_ensures(is_sorted(self))]
39
fn insertion_sort(&mut self) {
40
assert!(self[0] < self[1]);
41
0 commit comments