updated cargo fmt

This commit is contained in:
Henry Schimke
2023-10-28 11:04:14 -05:00
parent 4c9ec95d00
commit 5ea03cc066
24 changed files with 122 additions and 64 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);