Skip to content

Commit

Permalink
fix: cover all barcode formats
Browse files Browse the repository at this point in the history
  • Loading branch information
hschimke committed Jan 30, 2024
1 parent d3f1f85 commit 6b0a6f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ pub enum BarcodeFormat {

Telepen,

RectangularMicroQR,

///
UnsuportedFormat,
}
Expand Down Expand Up @@ -95,6 +97,8 @@ impl From<BarcodeFormat> for rxing::BarcodeFormat {
BarcodeFormat::MicroQR => rxing::BarcodeFormat::MICRO_QR_CODE,
BarcodeFormat::UnsuportedFormat => rxing::BarcodeFormat::UNSUPORTED_FORMAT,
BarcodeFormat::Telepen => rxing::BarcodeFormat::TELEPEN,
BarcodeFormat::RectangularMicroQR => rxing::BarcodeFormat::RECTANGULAR_MICRO_QR_CODE,

}
}
}
Expand Down Expand Up @@ -122,6 +126,7 @@ impl From<rxing::BarcodeFormat> for BarcodeFormat {
rxing::BarcodeFormat::MICRO_QR_CODE => BarcodeFormat::MicroQR,
rxing::BarcodeFormat::UNSUPORTED_FORMAT => BarcodeFormat::UnsuportedFormat,
rxing::BarcodeFormat::TELEPEN => BarcodeFormat::Telepen,
rxing::BarcodeFormat::RECTANGULAR_MICRO_QR_CODE => BarcodeFormat::RectangularMicroQR,
}
}
}
Expand Down

0 comments on commit 6b0a6f7

Please sign in to comment.