Merge branch 'main' into thiserror

# Conflicts:
#	src/aztec/decoder.rs
#	src/datamatrix/decoder/decoded_bit_stream_parser.rs
This commit is contained in:
Steve Cook
2023-03-01 13:39:30 -05:00
36 changed files with 1452 additions and 145 deletions

View File

@@ -153,7 +153,7 @@ impl Decoder {
fn correctErrors(&self, codewordBytes: &mut [u8], numDataCodewords: u32) -> Result<()> {
let _numCodewords = codewordBytes.len();
// First read into an array of ints
// let codewordsInts = vec![0i32;numCodewords];
// let codewordsInts = vec![0;numCodewords];
// for i in 0..numCodewords {
// // for (int i = 0; i < numCodewords; i++) {
// codewordsInts[i] = codewordBytes[i];

View File

@@ -732,7 +732,7 @@ fn decodeBase256Segment(
result.append_string(
&encoding::all::ISO_8859_1
.decode(&bytes, encoding::DecoderTrap::Strict)
.map_err(|e| Exceptions::parse_with(e))?,
.map_err(Exceptions::parse_with)?,
);
byteSegments.push(bytes);