From fcb147bb711c980b8a6a3fd1e4a390fa9a8fcdf7 Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Thu, 15 Feb 2024 18:02:58 +0800 Subject: [PATCH] :art: :hammer: fix clippy errors Signed-off-by: Wei Zhang --- src/meta/filetype.rs | 2 +- src/meta/name.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/meta/filetype.rs b/src/meta/filetype.rs index 61f63482c..81dc5cbab 100644 --- a/src/meta/filetype.rs +++ b/src/meta/filetype.rs @@ -16,7 +16,7 @@ pub enum FileType { impl FileType { #[cfg(windows)] - const EXECUTABLE_EXTENSIONS: &[&'static str] = &["exe", "msi", "bat", "ps1"]; + const EXECUTABLE_EXTENSIONS: &'static [&'static str] = &["exe", "msi", "bat", "ps1"]; #[cfg(unix)] pub fn new( diff --git a/src/meta/name.rs b/src/meta/name.rs index 3b326c847..32c8f645d 100644 --- a/src/meta/name.rs +++ b/src/meta/name.rs @@ -205,9 +205,7 @@ impl Ord for Name { impl PartialOrd for Name { fn partial_cmp(&self, other: &Self) -> Option { - self.name - .to_lowercase() - .partial_cmp(&other.name.to_lowercase()) + Some(self.cmp(other)) } }