From 2a087c5b64ac980d54d4fb113194de418ae835e1 Mon Sep 17 00:00:00 2001 From: Valerio Date: Tue, 24 Sep 2024 14:32:38 +0200 Subject: [PATCH] Call sort function in property test is_sorted --- examples/sort.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sort.rs b/examples/sort.rs index 0f495a0..d4d34ae 100644 --- a/examples/sort.rs +++ b/examples/sort.rs @@ -29,7 +29,7 @@ fn sort(list: &[T]) -> Vec { fn main() { fn is_sorted(xs: Vec) -> bool { - for win in xs.windows(2) { + for win in sort(&xs).windows(2) { if win[0] > win[1] { return false; }