mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12: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
|
// 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
|
// We don't care about errors in the error-correction codewords
|
||||||
for i in 0..numDataCodewords {
|
for (code_word, sent_code_word ) in codewordBytes.iter_mut().zip(sending_code_words.iter()).take(numDataCodewords){
|
||||||
// for (int i = 0; i < numDataCodewords; i++) {
|
*code_word = *sent_code_word as u8;
|
||||||
codewordBytes[i] = sending_code_words[i] as u8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user