summaryrefslogtreecommitdiff
path: root/systems/sheet/src/index_source.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-20 21:54:29 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-20 21:57:49 +0800
commit9a60751a901f568bdeb154c4115235d4f3a0f8b9 (patch)
tree65df323f6478bae51473a3d6471df39a596ce9c5 /systems/sheet/src/index_source.rs
parenta9e5c086584d3e697188be7003f564e7e2137135 (diff)
Apply clippy suggestions and improve code quality
Diffstat (limited to 'systems/sheet/src/index_source.rs')
-rw-r--r--systems/sheet/src/index_source.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/systems/sheet/src/index_source.rs b/systems/sheet/src/index_source.rs
index 43508f2..b11a6b6 100644
--- a/systems/sheet/src/index_source.rs
+++ b/systems/sheet/src/index_source.rs
@@ -62,7 +62,7 @@ impl IndexSource {
impl PartialEq for IndexSource {
fn eq(&self, other: &Self) -> bool {
- &self.remote == &other.remote && &self.id == &other.id && &self.ver == &other.ver
+ self.remote == other.remote && self.id == other.id && self.ver == other.ver
}
}
@@ -158,12 +158,6 @@ impl IndexSource {
impl std::fmt::Display for IndexSource {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let local_symbol = if self.remote { "" } else { "~" };
- write!(
- f,
- "{}{}/{}",
- local_symbol,
- self.id.to_string(),
- self.ver.to_string()
- )
+ write!(f, "{}{}/{}", local_symbol, self.id, self.ver)
}
}