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:
@@ -803,8 +803,8 @@ impl RSSExpandedReader {
|
||||
|
||||
// Make 'counters' hold 1-4
|
||||
let mut counters = self.decodeFinderCounters;
|
||||
let slc = counters[..counters.len() - 1].to_vec();
|
||||
counters[1..].copy_from_slice(&slc);
|
||||
let counters_len = counters.len();
|
||||
counters.copy_within(..counters_len - 1, 1);
|
||||
// System.arraycopy(counters, 0, counters, 1, counters.length - 1);
|
||||
|
||||
counters[0] = firstCounter as u32;
|
||||
|
||||
@@ -464,10 +464,10 @@ impl RSS14Reader {
|
||||
}
|
||||
firstElementStart += 1;
|
||||
let firstCounter = startEnd[0] - firstElementStart as usize;
|
||||
let mut counters = &mut self.decodeFinderCounters;
|
||||
let counters = &mut self.decodeFinderCounters;
|
||||
let counter_len = counters.len();
|
||||
let slc = counters[0..counter_len - 1].to_vec();
|
||||
counters[1..counter_len].copy_from_slice(&slc);
|
||||
|
||||
counters.copy_within(..counter_len - 1, 1);
|
||||
// Make 'counters' hold 1-4
|
||||
// let counters = self.getDecodeFinderCounters();
|
||||
// System.arraycopy(counters, 0, counters, 1, counters.length - 1);
|
||||
|
||||
Reference in New Issue
Block a user