mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 21:02:35 +00:00
change to using once_cell for lazy init
This commit is contained in:
@@ -21,14 +21,12 @@ use crate::{
|
||||
|
||||
use super::{one_d_reader, EANManufacturerOrgSupport, OneDReader, UPCEANExtensionSupport};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref EAN_MANUFACTURER_SUPPORT: EANManufacturerOrgSupport =
|
||||
EANManufacturerOrgSupport::default();
|
||||
pub static ref UPC_EAN_EXTENSION_SUPPORT: UPCEANExtensionSupport =
|
||||
UPCEANExtensionSupport::default();
|
||||
}
|
||||
pub static EAN_MANUFACTURER_SUPPORT: Lazy<EANManufacturerOrgSupport> =
|
||||
Lazy::new(|| EANManufacturerOrgSupport::default());
|
||||
pub static UPC_EAN_EXTENSION_SUPPORT: Lazy<UPCEANExtensionSupport> =
|
||||
Lazy::new(|| UPCEANExtensionSupport::default());
|
||||
|
||||
// These two values are critical for determining how permissive the decoding will be.
|
||||
// We've arrived at these values through a lot of trial and error. Setting them any higher
|
||||
|
||||
Reference in New Issue
Block a user