mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 20:32: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:
@@ -8,7 +8,7 @@ mod exceptions;
|
||||
pub mod maxicode;
|
||||
pub mod qrcode;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::{collections::HashMap, rc::Rc};
|
||||
|
||||
pub use exceptions::Exceptions;
|
||||
|
||||
@@ -40,7 +40,7 @@ pub use encode_hints::*;
|
||||
*
|
||||
* @see DecodeHintType#NEED_RESULT_POINT_CALLBACK
|
||||
*/
|
||||
pub type RXingResultPointCallback = fn(&dyn ResultPoint);
|
||||
pub type RXingResultPointCallback = Rc<dyn Fn(&dyn ResultPoint)>;
|
||||
|
||||
mod decode_hints;
|
||||
pub use decode_hints::*;
|
||||
|
||||
Reference in New Issue
Block a user