mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
updated cargo fmt
This commit is contained in:
@@ -29,7 +29,7 @@ impl BitMatrix {
|
||||
}
|
||||
|
||||
pub fn getTopLeftOnBitWithPosition(&self, left: &mut u32, top: &mut u32) -> bool {
|
||||
let Some(Point{x,y}) = self.getTopLeftOnBit() else {
|
||||
let Some(Point { x, y }) = self.getTopLeftOnBit() else {
|
||||
return false;
|
||||
};
|
||||
*left = x as u32;
|
||||
@@ -39,7 +39,7 @@ impl BitMatrix {
|
||||
}
|
||||
|
||||
pub fn getBottomRightOnBitWithPosition(&self, right: &mut u32, bottom: &mut u32) -> bool {
|
||||
let Some(Point{x,y}) = self.getBottomRightOnBit() else {
|
||||
let Some(Point { x, y }) = self.getBottomRightOnBit() else {
|
||||
return false;
|
||||
};
|
||||
*right = x as u32;
|
||||
|
||||
@@ -130,8 +130,12 @@ impl RegressionLineTrait for DMRegressionLine {
|
||||
}
|
||||
|
||||
fn isHighRes(&self) -> bool {
|
||||
let Some(mut min) = self.points.first().copied() else { return false };
|
||||
let Some(mut max) = self.points.first().copied() else { return false };
|
||||
let Some(mut min) = self.points.first().copied() else {
|
||||
return false;
|
||||
};
|
||||
let Some(mut max) = self.points.first().copied() else {
|
||||
return false;
|
||||
};
|
||||
for p in &self.points {
|
||||
min.x = f32::min(min.x, p.x);
|
||||
min.y = f32::min(min.y, p.y);
|
||||
|
||||
@@ -130,8 +130,12 @@ impl RegressionLineTrait for RegressionLine {
|
||||
}
|
||||
|
||||
fn isHighRes(&self) -> bool {
|
||||
let Some(mut min) = self.points.first().copied() else { return false };
|
||||
let Some(mut max) = self.points.first().copied() else { return false };
|
||||
let Some(mut min) = self.points.first().copied() else {
|
||||
return false;
|
||||
};
|
||||
let Some(mut max) = self.points.first().copied() else {
|
||||
return false;
|
||||
};
|
||||
for p in &self.points {
|
||||
min.x = f32::min(min.x, p.x);
|
||||
min.y = f32::min(min.y, p.y);
|
||||
|
||||
Reference in New Issue
Block a user