cargo fmt

This commit is contained in:
Henry Schimke
2023-01-07 14:03:57 -06:00
parent 23942e7db2
commit 245e14085a
3 changed files with 24 additions and 15 deletions

View File

@@ -674,12 +674,16 @@ impl From<BitMatrix> for image::DynamicImage {
impl From<&BitMatrix> for image::DynamicImage {
fn from(value: &BitMatrix) -> Self {
let mut pixels = image::ImageBuffer::new(value.width, value.height);
for y in 0..value.height {
for x in 0..value.width {
pixels.put_pixel(x, y, image::Luma([if value.get(x, y) {u8::MIN} else {u8::MAX} ]));
pixels.put_pixel(
x,
y,
image::Luma([if value.get(x, y) { u8::MIN } else { u8::MAX }]),
);
}
}
pixels.into()
}
}
}

View File

@@ -54,8 +54,10 @@ impl ReedSolomonEncoder {
.multiply(
&GenericGFPoly::new(
self.field,
&[1,
self.field.exp(d as i32 - 1 + self.field.getGeneratorBase())],
&[
1,
self.field.exp(d as i32 - 1 + self.field.getGeneratorBase()),
],
)
.unwrap(),
)