Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -127,19 +127,19 @@ impl DetectionRXingResultColumnTrait for DetectionRXingResultColumn {
impl Display for DetectionRXingResultColumn {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.isLeft.is_some() {
write!(f, "IsLeft: {} \n", self.isLeft.as_ref().unwrap())?;
writeln!(f, "IsLeft: {} ", self.isLeft.as_ref().unwrap())?;
}
let mut row = 0;
for codeword in &self.codewords {
// for (Codeword codeword : codewords) {
if codeword.is_none() {
write!(f, "{:3}: | \n", row)?;
writeln!(f, "{:3}: | ", row)?;
row += 1;
continue;
}
write!(
writeln!(
f,
"{:3}: {:3}|{:3}\n",
"{:3}: {:3}|{:3}",
row,
codeword.as_ref().unwrap().getRowNumber(),
codeword.as_ref().unwrap().getValue()