Fix the detection of unsorted order when not using the --check flag

This commit is contained in:
Jip J. Dekker 2024-10-16 13:10:27 +11:00
parent 78c8e56e66
commit 6938cb9d15
No known key found for this signature in database

View File

@ -414,14 +414,13 @@ impl<'a> Module<'a> {
}
for window in self.items.windows(2) {
if window[0].1 > window[1].1 {
// eprintln!("{:?} {:?}", window[0].1, window[1].1);
if print_diff {
eprintln!(
"Expected \n\"\"\"\n{}\n\"\"\"\n before \n\"\"\"\n{}\n\"\"\"",
window[1].1, window[0].1
);
return false;
}
return false;
}
}
true