update for shared state and improved performance

This commit is contained in:
Henry Schimke
2023-01-02 16:38:05 -06:00
parent 72f69dd6a0
commit 65f7c4d01b
46 changed files with 505 additions and 359 deletions

View File

@@ -392,7 +392,7 @@ mod code_39_extended_mode_test_case {
use std::collections::HashMap;
use crate::{
common::{BitArray, BitMatrix},
common::BitMatrix,
oned::{Code39Reader, OneDReader},
};
#[test]
@@ -412,8 +412,8 @@ mod code_39_extended_mode_test_case {
let mut sut = Code39Reader::with_all_config(false, true);
let matrix =
BitMatrix::parse_strings(encodedRXingResult, "1", "0").expect("bitmatrix parse");
let row = BitArray::with_size(matrix.getWidth() as usize);
let row = matrix.getRow(0, row);
// let row = BitArray::with_size(matrix.getWidth() as usize);
let row = matrix.getRow(0);
let result = sut.decodeRow(0, &row, &HashMap::new()).expect("decode row");
assert_eq!(expectedRXingResult, result.getText());
}