diff --git a/rust/hg-core/src/utils.rs b/rust/hg-core/src/utils.rs --- a/rust/hg-core/src/utils.rs +++ b/rust/hg-core/src/utils.rs @@ -18,8 +18,7 @@ where T: Clone + PartialEq, { - assert_eq!(from.len(), to.len()); - if buf.len() < from.len() { + if buf.len() < from.len() || from.len() != to.len() { return; } for i in 0..=buf.len() - from.len() {