mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
change NEEDS_RESULT_CALLBACK to accept closures
This resolves issue #2. This is a breaking change, and should necessitate moving to v0.3.0 FIXES: #2
This commit is contained in:
@@ -84,7 +84,7 @@ impl<'a> Detector<'_> {
|
||||
hints.get(&DecodeHintType::NEED_RESULT_POINT_CALLBACK)
|
||||
{
|
||||
// if let DecodeHintValue::NeedResultPointCallback(cb) = nrpc {
|
||||
Some(*cb)
|
||||
Some(cb.clone())
|
||||
// } else {
|
||||
// None
|
||||
// }
|
||||
@@ -97,7 +97,7 @@ impl<'a> Detector<'_> {
|
||||
// (RXingResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
|
||||
|
||||
let mut finder =
|
||||
FinderPatternFinder::with_callback(self.image.clone(), self.resultPointCallback);
|
||||
FinderPatternFinder::with_callback(self.image.clone(), self.resultPointCallback.clone());
|
||||
let info = finder.find(hints)?;
|
||||
|
||||
self.processFinderPatternInfo(info)
|
||||
@@ -479,7 +479,7 @@ impl<'a> Detector<'_> {
|
||||
alignmentAreaRightX - alignmentAreaLeftX,
|
||||
alignmentAreaBottomY - alignmentAreaTopY,
|
||||
overallEstModuleSize,
|
||||
self.resultPointCallback,
|
||||
self.resultPointCallback.clone(),
|
||||
);
|
||||
alignmentFinder.find()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user