--- a/rust/hg-core/src/revlog/node.rs Tue Jul 23 14:25:23 2024 +0200
+++ b/rust/hg-core/src/revlog/node.rs Thu Jul 18 13:35:39 2024 +0200
@@ -83,7 +83,7 @@
#[inline]
fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error> {
match Node::from_bytes(bytes) {
- Ok((node, rest)) if rest.is_empty() => Ok(node),
+ Ok((node, [])) => Ok(node),
_ => Err(()),
}
}
@@ -323,6 +323,9 @@
}
#[cfg(test)]
+pub use tests::hex_pad_right;
+
+#[cfg(test)]
mod tests {
use super::*;
@@ -428,6 +431,3 @@
assert_eq!(prefix.first_different_nybble(&node), None);
}
}
-
-#[cfg(test)]
-pub use tests::hex_pad_right;