diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 29e25fb..d480fe8 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] image = "0.24.*" zxing-cpp = { version = "0.4.1", features = ["bundled", "image"] } -rxing = { version = "0.6.1", features = ["image"] } +rxing = { version = "0.7.1", features = ["image"] } zbar-rust = "0.0.24" diff --git a/rust/src/main.rs b/rust/src/main.rs index 6297419..8f07ecf 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -30,17 +30,14 @@ fn test_rxing(image: &image::GrayImage, limit_formats: bool) -> Results { use rxing::*; use std::collections::HashSet; - let mut hints = DecodingHintDictionary::default(); - // hints.insert(DecodeHintType::TRY_HARDER, DecodeHintValue::TryHarder(true)); - // hints.insert(DecodeHintType::ALSO_INVERTED, DecodeHintValue::AlsoInverted(false)); + let mut hints = DecodeHints::default(); + // hints.TryHarder = Some(false); + // hints.AlsoInverted = Some(false); if limit_formats { - hints.insert( - DecodeHintType::POSSIBLE_FORMATS, - DecodeHintValue::PossibleFormats(HashSet::from([ + hints.PossibleFormats = Some(HashSet::from([ CODABAR, CODE_39, CODE_93, CODE_128, RSS_14, EAN_8, EAN_13, ITF, QR_CODE, UPC_E, - ])), - ); + ])); } let results = rxing::helpers::detect_multiple_in_luma_with_hints(