mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
zip to copy results
This commit is contained in:
@@ -215,9 +215,9 @@ fn correctErrors(codewordBytes: &mut [u8], numDataCodewords: usize) -> Result<()
|
||||
|
||||
// Copy back into array of bytes -- only need to worry about the bytes that were data
|
||||
// We don't care about errors in the error-correction codewords
|
||||
for i in 0..numDataCodewords {
|
||||
// for (int i = 0; i < numDataCodewords; i++) {
|
||||
codewordBytes[i] = sending_code_words[i] as u8;
|
||||
for (code_word, sent_code_word ) in codewordBytes.iter_mut().zip(sending_code_words.iter()).take(numDataCodewords){
|
||||
*code_word = *sent_code_word as u8;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user