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.
--- 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<Node> for NodePrefix {
fn eq(&self, other: &Node) -> bool {
- Self::from(*other) == *self
+ self.data == other.data && self.nybbles_len() == other.nybbles_len()
}
}