mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
cargo fmt
This commit is contained in:
@@ -75,7 +75,7 @@ impl DataBlock {
|
|||||||
numDataCodewords as u32,
|
numDataCodewords as u32,
|
||||||
vec![0; numBlockCodewords],
|
vec![0; numBlockCodewords],
|
||||||
));
|
));
|
||||||
numRXingResultBlocks +=1;
|
numRXingResultBlocks += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ impl Detector {
|
|||||||
/**
|
/**
|
||||||
* Detect a second solid side next to first solid side.
|
* Detect a second solid side next to first solid side.
|
||||||
*/
|
*/
|
||||||
fn detectSolid2(&self, points: [RXingResultPoint;4]) -> [RXingResultPoint; 4] {
|
fn detectSolid2(&self, points: [RXingResultPoint; 4]) -> [RXingResultPoint; 4] {
|
||||||
// A..D
|
// A..D
|
||||||
// : :
|
// : :
|
||||||
// B--C
|
// B--C
|
||||||
@@ -262,7 +262,7 @@ impl Detector {
|
|||||||
/**
|
/**
|
||||||
* Shift the edge points to the module center.
|
* Shift the edge points to the module center.
|
||||||
*/
|
*/
|
||||||
fn shiftToModuleCenter(&self, points: [RXingResultPoint;4]) -> [RXingResultPoint; 4] {
|
fn shiftToModuleCenter(&self, points: [RXingResultPoint; 4]) -> [RXingResultPoint; 4] {
|
||||||
// A..D
|
// A..D
|
||||||
// | :
|
// | :
|
||||||
// B--C
|
// B--C
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ impl MultiFormatReader {
|
|||||||
//TODO: ADD MultiformatOneDReader here
|
//TODO: ADD MultiformatOneDReader here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.readers = readers;//Vec::new(); //readers.toArray(EMPTY_READER_ARRAY);
|
self.readers = readers; //Vec::new(); //readers.toArray(EMPTY_READER_ARRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn decodeInternal(&mut self, image: &BinaryBitmap) -> Result<RXingResult, Exceptions> {
|
pub fn decodeInternal(&mut self, image: &BinaryBitmap) -> Result<RXingResult, Exceptions> {
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{aztec::AztecWriter, qrcode::QRCodeWriter, BarcodeFormat, Exceptions, Writer, datamatrix::DataMatrixWriter};
|
use crate::{
|
||||||
|
aztec::AztecWriter, datamatrix::DataMatrixWriter, qrcode::QRCodeWriter, BarcodeFormat,
|
||||||
|
Exceptions, Writer,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat
|
* This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat
|
||||||
@@ -67,8 +70,7 @@ impl Writer for MultiFormatWriter {
|
|||||||
// writer = PDF417Writer(),
|
// writer = PDF417Writer(),
|
||||||
BarcodeFormat::CODABAR => unimplemented!(""),
|
BarcodeFormat::CODABAR => unimplemented!(""),
|
||||||
// writer = CodaBarWriter(),
|
// writer = CodaBarWriter(),
|
||||||
BarcodeFormat::DATA_MATRIX =>
|
BarcodeFormat::DATA_MATRIX => Box::new(DataMatrixWriter {}),
|
||||||
Box::new(DataMatrixWriter{}),
|
|
||||||
BarcodeFormat::AZTEC => Box::new(AztecWriter {}),
|
BarcodeFormat::AZTEC => Box::new(AztecWriter {}),
|
||||||
_ => {
|
_ => {
|
||||||
return Err(Exceptions::IllegalArgumentException(format!(
|
return Err(Exceptions::IllegalArgumentException(format!(
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
fs::{read_dir, read_to_string},
|
fs::{read_dir, read_to_string},
|
||||||
path::{Path, PathBuf}, rc::Rc,
|
path::{Path, PathBuf},
|
||||||
|
rc::Rc,
|
||||||
};
|
};
|
||||||
|
|
||||||
use rxing::{
|
use rxing::{
|
||||||
|
|||||||
Reference in New Issue
Block a user