From ba1c5d495f53e7e5a0b1bba6ddb0f756b7c2f7d3 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 5 Feb 2023 11:58:33 +0100 Subject: [PATCH] util.rs: fix Yoda condition --- fish-rust/src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish-rust/src/util.rs b/fish-rust/src/util.rs index 48fc7fb2d..d15ea56dc 100644 --- a/fish-rust/src/util.rs +++ b/fish-rust/src/util.rs @@ -225,7 +225,7 @@ fn wcsfilecmp_leading_digits(a: &wstr, b: &wstr) -> (Ordering, usize, usize) { // first differing digit. // // If the numbers have the same length, that's the value. - if let Ordering::Equal = ret { + if ret == Ordering::Equal { // Comparing the string value is the same as numerical // for wchar_t digits! if ac > bc {