mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
cargo fmt
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
use rxing_one_d_proc_derive::OneDReader;
|
||||
|
||||
use crate::common::{BitArray, Result};
|
||||
use crate::{BarcodeFormat, Point};
|
||||
use crate::DecodeHintValue;
|
||||
use crate::Exceptions;
|
||||
use crate::RXingResult;
|
||||
use crate::{BarcodeFormat, Point};
|
||||
|
||||
use super::OneDReader;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use rxing_one_d_proc_derive::OneDReader;
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, Exceptions, RXingResult, Point,
|
||||
BarcodeFormat, Exceptions, Point, RXingResult,
|
||||
};
|
||||
|
||||
use super::{one_d_reader, OneDReader};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
use rxing_one_d_proc_derive::OneDReader;
|
||||
|
||||
use crate::common::{BitArray, Result};
|
||||
use crate::{BarcodeFormat, Exceptions, RXingResult, Point};
|
||||
use crate::{BarcodeFormat, Exceptions, Point, RXingResult};
|
||||
|
||||
use super::{one_d_reader, OneDReader};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use rxing_one_d_proc_derive::OneDReader;
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, Exceptions, RXingResult, Point,
|
||||
BarcodeFormat, Exceptions, Point, RXingResult,
|
||||
};
|
||||
|
||||
use super::{one_d_reader, OneDReader};
|
||||
|
||||
@@ -18,7 +18,7 @@ use rxing_one_d_proc_derive::OneDReader;
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, DecodeHintValue, Exceptions, RXingResult, Point,
|
||||
BarcodeFormat, DecodeHintValue, Exceptions, Point, RXingResult,
|
||||
};
|
||||
|
||||
use super::{one_d_reader, OneDReader};
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BinaryBitmap, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions, RXingResult,
|
||||
RXingResultMetadataType, RXingResultMetadataValue, Point, Reader, ResultPoint,
|
||||
BinaryBitmap, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions, Point,
|
||||
RXingResult, RXingResultMetadataType, RXingResultMetadataValue, Reader, ResultPoint,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -117,14 +117,10 @@ pub trait OneDReader: Reader {
|
||||
// And remember to flip the result points horizontally.
|
||||
let points = result.getPointsMut();
|
||||
if !points.is_empty() && points.len() >= 2 {
|
||||
points[0] = Point::new(
|
||||
width as f32 - points[0].getX() - 1.0,
|
||||
points[0].getY(),
|
||||
);
|
||||
points[1] = Point::new(
|
||||
width as f32 - points[1].getX() - 1.0,
|
||||
points[1].getY(),
|
||||
);
|
||||
points[0] =
|
||||
Point::new(width as f32 - points[0].getX() - 1.0, points[0].getY());
|
||||
points[1] =
|
||||
Point::new(width as f32 - points[1].getX() - 1.0, points[1].getY());
|
||||
}
|
||||
}
|
||||
return Ok(result);
|
||||
|
||||
@@ -19,8 +19,8 @@ use std::collections::HashMap;
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
oned::{one_d_reader, OneDReader},
|
||||
BarcodeFormat, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions,
|
||||
RXingResult, RXingResultMetadataType, RXingResultMetadataValue, Point, Reader,
|
||||
BarcodeFormat, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions, Point,
|
||||
RXingResult, RXingResultMetadataType, RXingResultMetadataValue, Reader,
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
||||
@@ -18,8 +18,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, Exceptions, RXingResult, RXingResultMetadataType, RXingResultMetadataValue,
|
||||
Point,
|
||||
BarcodeFormat, Exceptions, Point, RXingResult, RXingResultMetadataType,
|
||||
RXingResultMetadataValue,
|
||||
};
|
||||
|
||||
use super::{upc_ean_reader, UPCEANReader, STAND_IN};
|
||||
|
||||
@@ -18,8 +18,8 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, Exceptions, RXingResult, RXingResultMetadataType, RXingResultMetadataValue,
|
||||
Point,
|
||||
BarcodeFormat, Exceptions, Point, RXingResult, RXingResultMetadataType,
|
||||
RXingResultMetadataValue,
|
||||
};
|
||||
|
||||
use super::{upc_ean_reader, UPCEANReader, STAND_IN};
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
BarcodeFormat, DecodeHintType, DecodeHintValue, Exceptions, RXingResult,
|
||||
RXingResultMetadataType, RXingResultMetadataValue, Point, Reader,
|
||||
BarcodeFormat, DecodeHintType, DecodeHintValue, Exceptions, Point, RXingResult,
|
||||
RXingResultMetadataType, RXingResultMetadataValue, Reader,
|
||||
};
|
||||
|
||||
use super::{one_d_reader, EANManufacturerOrgSupport, OneDReader, UPCEANExtensionSupport};
|
||||
@@ -223,8 +223,7 @@ pub trait UPCEANReader: OneDReader {
|
||||
),
|
||||
);
|
||||
decodeRXingResult.putAllMetadata(extensionRXingResult.getRXingResultMetadata().clone());
|
||||
decodeRXingResult
|
||||
.addPoints(&mut extensionRXingResult.getPoints().clone());
|
||||
decodeRXingResult.addPoints(&mut extensionRXingResult.getPoints().clone());
|
||||
extensionLength = extensionRXingResult.getText().chars().count();
|
||||
Ok(())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user