mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
Use thiserror for error handling with less boilerplate
This commit is contained in:
@@ -89,7 +89,7 @@ pub fn decode(bytes: &[u8], mode: u8) -> Result<DecoderRXingResult> {
|
||||
let pc = getPostCode2(bytes);
|
||||
let ps2Length = getPostCode2Length(bytes) as usize;
|
||||
if ps2Length > 10 {
|
||||
return Err(Exceptions::format);
|
||||
return Err(Exceptions::FORMAT);
|
||||
}
|
||||
// NumberFormat df = new DecimalFormat("0000000000".substring(0, ps2Length));
|
||||
// postcode = df.format(pc);
|
||||
|
||||
Reference in New Issue
Block a user