mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 21:02:35 +00:00
move applicable copy_from_slice to copy_within
This commit is contained in:
@@ -442,8 +442,8 @@ pub trait UPCEANReader: OneDReader {
|
||||
return Ok([patternStart, x]);
|
||||
}
|
||||
patternStart += (counters[0] + counters[1]) as usize;
|
||||
let slc = &counters[2..(counterPosition - 1 + 2)].to_vec();
|
||||
counters[..(counterPosition - 1)].copy_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;
|
||||
|
||||
Reference in New Issue
Block a user