mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 21:02:35 +00:00
Merge branch 'main' into pr/exception_helpers
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
use rxing_one_d_proc_derive::OneDWriter;
|
||||
|
||||
use crate::common::Result;
|
||||
use crate::BarcodeFormat;
|
||||
|
||||
use super::OneDimensionalCodeWriter;
|
||||
@@ -29,7 +30,7 @@ use super::OneDimensionalCodeWriter;
|
||||
pub struct ITFWriter;
|
||||
|
||||
impl OneDimensionalCodeWriter for ITFWriter {
|
||||
fn encode_oned(&self, contents: &str) -> Result<Vec<bool>, Exceptions> {
|
||||
fn encode_oned(&self, contents: &str) -> Result<Vec<bool>> {
|
||||
let length = contents.chars().count();
|
||||
if length % 2 != 0 {
|
||||
return Err(Exceptions::illegalArgumentWith(
|
||||
|
||||
Reference in New Issue
Block a user