add missing to_string methods in pdf417

This commit is contained in:
Henry Schimke
2022-12-31 11:56:14 -06:00
parent da39b9fce4
commit f59507ce2a
5 changed files with 61 additions and 45 deletions

View File

@@ -127,9 +127,26 @@ 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());
write!(f, "IsLeft: {} \n", self.isLeft.as_ref().unwrap())?;
}
todo!()
let mut row = 0;
for codeword in &self.codewords {
// for (Codeword codeword : codewords) {
if codeword.is_none() {
write!(f, "{:3}: | \n", row)?;
row += 1;
continue;
}
write!(
f,
"{:3}: {:3}|{:3}\n",
row,
codeword.as_ref().unwrap().getRowNumber(),
codeword.as_ref().unwrap().getValue()
)?;
row += 1;
}
write!(f, "")
}
// @Override