# HG changeset patch # User Raphaël Gomès # Date 1673287098 -3600 # Node ID 2202832b35e89d0950e8ce0d86eb336b4e4df361 # Parent 0780371d6b1e37c2c00b3287cb0d1f42672ae13e rust-nodemap: implement `PartialEq` without allocation This was caught by `clippy`. It's probable that this ends up optimized out by the compiler, but let's not rely on that. diff -r 0780371d6b1e -r 2202832b35e8 rust/hg-core/src/revlog/node.rs --- a/rust/hg-core/src/revlog/node.rs Mon Jan 09 18:54:57 2023 +0100 +++ b/rust/hg-core/src/revlog/node.rs Mon Jan 09 18:58:18 2023 +0100 @@ -314,7 +314,7 @@ impl PartialEq for NodePrefix { fn eq(&self, other: &Node) -> bool { - Self::from(*other) == *self + self.data == other.data && self.nybbles_len() == other.nybbles_len() } }