From 497a667f49c8dea870a8a61ddabd95e24765a80d Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 17 Apr 2026 09:45:13 +0800 Subject: Apply clippy suggestions - Use `BTreeMap::entry` API in `update_item` - Replace `or_insert_with(Vec::new)` with `or_default` - Iterate over map values instead of key-value pairs - Use `std::io::Error::other` for custom errors - Simplify filter logic with direct predicate - Replace manual `Into` implementation with `From` - Remove unnecessary explicit returns --- src/who.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/who.rs') diff --git a/src/who.rs b/src/who.rs index 32f536b..8e16765 100644 --- a/src/who.rs +++ b/src/who.rs @@ -33,9 +33,9 @@ impl From<&str> for Who { } } -impl Into for Who { - fn into(self) -> String { - self.name +impl From for String { + fn from(val: Who) -> Self { + val.name } } -- cgit