fix(grouping): non-canonical ordering

clippy: incorrect_partial_ord_impl_on_ord_type
This commit is contained in:
steven-omaha
2023-10-10 15:28:28 +02:00
parent c59f22a427
commit 02c44c92d0
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -94,10 +94,7 @@ fn is_child_of_any_dir(path: &Path, dirs: &[PathBuf]) -> bool {
impl PartialOrd for Group { impl PartialOrd for Group {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
match self.name.partial_cmp(&other.name) { Some(self.cmp(other))
Some(core::cmp::Ordering::Equal) => None,
ord => ord,
}
} }
} }
+1 -1
View File
@@ -67,7 +67,7 @@ impl Eq for Section {
impl PartialOrd for Section { impl PartialOrd for Section {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.name.partial_cmp(&other.name) Some(self.cmp(other))
} }
} }