diff --git a/src/oned/code_39_reader.rs b/src/oned/code_39_reader.rs index 77a5f26..7a193ea 100644 --- a/src/oned/code_39_reader.rs +++ b/src/oned/code_39_reader.rs @@ -229,8 +229,8 @@ impl Code39Reader { // return new int[]{patternStart, i}; } patternStart += (counters[0] + counters[1]) as usize; - let slc = counters[2..(counterPosition - 1 + 2)].to_vec(); - counters[0..(counterPosition - 1)].clone_from_slice(&slc[..]); + + counters.copy_within(2..(counterPosition - 1 + 2), 0); // System.arraycopy(counters, 2, counters, 0, counterPosition - 1); counters[counterPosition - 1] = 0; counters[counterPosition] = 0;