Skip to content
Snippets Groups Projects
Commit 2f760da1 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

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
parent 5672bb73
Branches
Tags
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment