Show More
@@ -18,8 +18,7 b' pub fn replace_slice<T>(buf: &mut [T], f' | |||||
18 | where |
|
18 | where | |
19 | T: Clone + PartialEq, |
|
19 | T: Clone + PartialEq, | |
20 | { |
|
20 | { | |
21 | assert_eq!(from.len(), to.len()); |
|
21 | if buf.len() < from.len() || from.len() != to.len() { | |
22 | if buf.len() < from.len() { |
|
|||
23 | return; |
|
22 | return; | |
24 | } |
|
23 | } | |
25 | for i in 0..=buf.len() - from.len() { |
|
24 | for i in 0..=buf.len() - from.len() { |
General Comments 0
You need to be logged in to leave comments.
Login now