Skip to content

Commit 4c33d2d

Browse files
committed
wip: immutable reader stubs in experimental
1 parent b2ecb23 commit 4c33d2d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/reader.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
//package com.google.zxing;
18-
19-
use std::collections::HashMap;
20-
2117
use crate::{common::Result, Binarizer, BinaryBitmap, DecodingHintDictionary, RXingResult};
2218

2319
/**
@@ -70,9 +66,12 @@ pub trait Reader {
7066
*/
7167
fn reset(&mut self) { /* do nothing */
7268
}
69+
}
7370

71+
#[cfg( feature = "experimental_features")]
72+
pub trait ImmutableReader {
7473
fn immutable_decode<B: Binarizer>(&self, image: &mut BinaryBitmap<B>) -> Result<RXingResult> {
75-
self.immutable_decode_with_hints(image, &HashMap::default())
74+
self.immutable_decode_with_hints(image, &DecodingHintDictionary::default())
7675
}
7776

7877
fn immutable_decode_with_hints<B: Binarizer>(
@@ -82,4 +81,4 @@ pub trait Reader {
8281
) -> Result<RXingResult> {
8382
unimplemented!()
8483
}
85-
}
84+
}

0 commit comments

Comments
 (0)