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
--- 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() {