# HG changeset patch # User Raphaël Gomès # Date 1563380151 -7200 # Node ID 2f760da140ee4437293c874b5021f6d9f5d287d9 # Parent 5672bb73f61e9597a634bf9cf4bf79858e8cd44c rust-utils: remove buggy assertion While this assertion had good intentions, it broke existing behavior with a nasty panic. Differential Revision: https://phab.mercurial-scm.org/D6651 diff -r 5672bb73f61e -r 2f760da140ee rust/hg-core/src/utils.rs --- a/rust/hg-core/src/utils.rs Wed Jul 10 17:41:07 2019 +0200 +++ b/rust/hg-core/src/utils.rs Wed Jul 17 18:15:51 2019 +0200 @@ -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() {