From 8aecc83f53646da843031dd01b43e3354d5356de Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Sun, 6 Oct 2024 22:48:58 +0100 Subject: [PATCH] clippy --- src/string.rs | 2 +- tests/conversion.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/string.rs b/src/string.rs index 636c725..264d51f 100644 --- a/src/string.rs +++ b/src/string.rs @@ -174,7 +174,7 @@ impl Eq for String {} impl PartialOrd for String { fn partial_cmp(&self, other: &String) -> Option { - self.as_bytes().partial_cmp(&other.as_bytes()) + Some(self.cmp(other)) } } diff --git a/tests/conversion.rs b/tests/conversion.rs index e61dd32..0bad495 100644 --- a/tests/conversion.rs +++ b/tests/conversion.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; -use std::ffi::{CStr, CString, OsStr, OsString}; -use std::path::{Path, PathBuf}; +use std::ffi::{CStr, CString, OsString}; +use std::path::PathBuf; use bstr::BString; use maplit::{btreemap, btreeset, hashmap, hashset};