aboutsummaryrefslogtreecommitdiff
path: root/src/who.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-17 09:45:13 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-17 09:45:13 +0800
commit497a667f49c8dea870a8a61ddabd95e24765a80d (patch)
tree84bed9d9b604af593b1031ae62ca7b3fec4d7112 /src/who.rs
parent5e7d1968e94bf39d369de0e6ef98cf383cfd3d6f (diff)
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
Diffstat (limited to 'src/who.rs')
-rw-r--r--src/who.rs6
1 files changed, 3 insertions, 3 deletions
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<String> for Who {
- fn into(self) -> String {
- self.name
+impl From<Who> for String {
+ fn from(val: Who) -> Self {
+ val.name
}
}