mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
refactor to use common result type
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
use crate::{common::DecoderRXingResult, Exceptions};
|
||||
use crate::{
|
||||
common::{DecoderRXingResult, Result},
|
||||
Exceptions,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
/**
|
||||
@@ -78,7 +81,7 @@ static SETS: Lazy<[String; 5]> = Lazy::new(|| {
|
||||
]
|
||||
});
|
||||
|
||||
pub fn decode(bytes: &[u8], mode: u8) -> Result<DecoderRXingResult, Exceptions> {
|
||||
pub fn decode(bytes: &[u8], mode: u8) -> Result<DecoderRXingResult> {
|
||||
let mut result = String::with_capacity(144);
|
||||
match mode {
|
||||
2 | 3 => {
|
||||
|
||||
Reference in New Issue
Block a user