From 4c33d2d20b8014f3e01a7d55c88a04a64d88043b Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Wed, 31 Jul 2024 10:51:54 -0500 Subject: [PATCH] wip: immutable reader stubs in experimental --- src/reader.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/reader.rs b/src/reader.rs index 872cdb49..d2ff5c23 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -14,10 +14,6 @@ * limitations under the License. */ -//package com.google.zxing; - -use std::collections::HashMap; - use crate::{common::Result, Binarizer, BinaryBitmap, DecodingHintDictionary, RXingResult}; /** @@ -70,9 +66,12 @@ pub trait Reader { */ fn reset(&mut self) { /* do nothing */ } +} +#[cfg( feature = "experimental_features")] +pub trait ImmutableReader { fn immutable_decode(&self, image: &mut BinaryBitmap) -> Result { - self.immutable_decode_with_hints(image, &HashMap::default()) + self.immutable_decode_with_hints(image, &DecodingHintDictionary::default()) } fn immutable_decode_with_hints( @@ -82,4 +81,4 @@ pub trait Reader { ) -> Result { unimplemented!() } -} +} \ No newline at end of file