mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
clippy --fix && fmt
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
use crate::{
|
||||
common::{BitSource, CharacterSet, DecoderRXingResult, Result, StringUtils, Eci},
|
||||
common::{BitSource, CharacterSet, DecoderRXingResult, Eci, Result, StringUtils},
|
||||
DecodingHintDictionary, Exceptions,
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ pub fn decode(
|
||||
Mode::ECI => {
|
||||
// Count doesn't apply to ECI
|
||||
let value = parseECIValue(&mut bits)?;
|
||||
currentCharacterSetECI = CharacterSet::from(Eci::from(value)).into();//CharacterSet::get_character_set_by_eci(value).ok();
|
||||
currentCharacterSetECI = CharacterSet::from(Eci::from(value)).into(); //CharacterSet::get_character_set_by_eci(value).ok();
|
||||
if currentCharacterSetECI.is_none() {
|
||||
return Err(Exceptions::format_with(format!(
|
||||
"Value of {value} not valid"
|
||||
|
||||
@@ -24,7 +24,7 @@ use unicode_segmentation::UnicodeSegmentation;
|
||||
use crate::{
|
||||
common::{
|
||||
reedsolomon::{get_predefined_genericgf, PredefinedGenericGF, ReedSolomonEncoder},
|
||||
BitArray, CharacterSet, Result, Eci,
|
||||
BitArray, CharacterSet, Eci, Result,
|
||||
},
|
||||
qrcode::decoder::{ErrorCorrectionLevel, Mode, Version, VersionRef},
|
||||
EncodeHintType, EncodeHintValue, EncodingHintDictionary, Exceptions,
|
||||
@@ -716,11 +716,7 @@ pub fn appendAlphanumericBytes(content: &str, bits: &mut BitArray) -> Result<()>
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn append8BitBytes(
|
||||
content: &str,
|
||||
bits: &mut BitArray,
|
||||
encoding: CharacterSet,
|
||||
) -> Result<()> {
|
||||
pub fn append8BitBytes(content: &str, bits: &mut BitArray, encoding: CharacterSet) -> Result<()> {
|
||||
let bytes = encoding
|
||||
.encode(content)
|
||||
.map_err(|e| Exceptions::writer_with(format!("error {e}")))?;
|
||||
|
||||
Reference in New Issue
Block a user