From 453fc41f3ffe5361379bd4bca1cd0b5ead266902 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Thu, 5 Jan 2023 11:00:46 -0600 Subject: [PATCH] clippy --fix --- src/datamatrix/data_matrix_reader.rs | 2 +- src/datamatrix/decoder/version.rs | 2 +- src/oned/code_128_writer_test_tase.rs | 2 +- src/oned/upc_ean_reader.rs | 4 ++-- src/qrcode/decoder/version.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/datamatrix/data_matrix_reader.rs b/src/datamatrix/data_matrix_reader.rs index d5857b8..84dd933 100644 --- a/src/datamatrix/data_matrix_reader.rs +++ b/src/datamatrix/data_matrix_reader.rs @@ -26,7 +26,7 @@ use super::{decoder::Decoder, detector::Detector}; use once_cell::sync::Lazy; -static DECODER: Lazy = Lazy::new(|| Decoder::new()); +static DECODER: Lazy = Lazy::new(Decoder::new); /** * This implementation can detect and decode Data Matrix codes in an image. diff --git a/src/datamatrix/decoder/version.rs b/src/datamatrix/decoder/version.rs index 7f31981..695ab60 100644 --- a/src/datamatrix/decoder/version.rs +++ b/src/datamatrix/decoder/version.rs @@ -19,7 +19,7 @@ use once_cell::sync::Lazy; use crate::Exceptions; -static VERSIONS: Lazy> = Lazy::new(|| Version::buildVersions()); +static VERSIONS: Lazy> = Lazy::new(Version::buildVersions); pub type VersionRef = &'static Version; diff --git a/src/oned/code_128_writer_test_tase.rs b/src/oned/code_128_writer_test_tase.rs index 19b19f8..c1619bf 100644 --- a/src/oned/code_128_writer_test_tase.rs +++ b/src/oned/code_128_writer_test_tase.rs @@ -44,7 +44,7 @@ use crate::{ use super::Code128Writer; -static WRITER: Lazy = Lazy::new(|| Code128Writer::default()); +static WRITER: Lazy = Lazy::new(Code128Writer::default); #[test] fn testEncodeWithFunc3() { diff --git a/src/oned/upc_ean_reader.rs b/src/oned/upc_ean_reader.rs index 4c7ee13..8298cc6 100644 --- a/src/oned/upc_ean_reader.rs +++ b/src/oned/upc_ean_reader.rs @@ -24,9 +24,9 @@ use super::{one_d_reader, EANManufacturerOrgSupport, OneDReader, UPCEANExtension use once_cell::sync::Lazy; pub static EAN_MANUFACTURER_SUPPORT: Lazy = - Lazy::new(|| EANManufacturerOrgSupport::default()); + Lazy::new(EANManufacturerOrgSupport::default); pub static UPC_EAN_EXTENSION_SUPPORT: Lazy = - Lazy::new(|| UPCEANExtensionSupport::default()); + 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 diff --git a/src/qrcode/decoder/version.rs b/src/qrcode/decoder/version.rs index b833909..ec61e48 100755 --- a/src/qrcode/decoder/version.rs +++ b/src/qrcode/decoder/version.rs @@ -24,7 +24,7 @@ use once_cell::sync::Lazy; pub type VersionRef = &'static Version; -static VERSIONS: Lazy> = Lazy::new(|| Version::buildVersions()); +static VERSIONS: Lazy> = Lazy::new(Version::buildVersions); /** * See ISO 18004:2006 Annex D.