comparison rust/hg-core/src/revlog/node.rs @ 49927:2202832b35e8

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.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:58:18 +0100
parents c7fb9b74e753
children 532e74ad3ff6
comparison
equal deleted inserted replaced
49926:0780371d6b1e 49927:2202832b35e8
312 } 312 }
313 } 313 }
314 314
315 impl PartialEq<Node> for NodePrefix { 315 impl PartialEq<Node> for NodePrefix {
316 fn eq(&self, other: &Node) -> bool { 316 fn eq(&self, other: &Node) -> bool {
317 Self::from(*other) == *self 317 self.data == other.data && self.nybbles_len() == other.nybbles_len()
318 } 318 }
319 } 319 }
320 320
321 #[cfg(test)] 321 #[cfg(test)]
322 mod tests { 322 mod tests {