diff --git a/Cargo.toml b/Cargo.toml index cc47c47..af20880 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rxing" -version = "0.2.8" +version = "0.2.9" description="A rust port of the zxing barcode library." license="Apache-2.0" repository="https://github.com/hschimke/rxing" diff --git a/README.md b/README.md index 177ccca..bc1d125 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ fn main() { ``` ## Latest Release Notes +v0.2.9 -> Major fix, codabar was not being encoded by multiformat writer. + v0.2.6 -> Fix missing result point callback for rss14 v0.2.4 -> Add helper functions for common cases (read a file, use raw luma8 data). diff --git a/src/multi_format_writer.rs b/src/multi_format_writer.rs index 6f02c34..e416788 100644 --- a/src/multi_format_writer.rs +++ b/src/multi_format_writer.rs @@ -21,7 +21,7 @@ use crate::{ datamatrix::DataMatrixWriter, oned::{ Code128Writer, Code39Writer, Code93Writer, EAN13Writer, EAN8Writer, ITFWriter, UPCAWriter, - UPCEWriter, + UPCEWriter, CodaBarWriter, }, pdf417::PDF417Writer, qrcode::QRCodeWriter, @@ -67,7 +67,7 @@ impl Writer for MultiFormatWriter { BarcodeFormat::CODE_128 => Box::::default(), BarcodeFormat::ITF => Box::::default(), BarcodeFormat::PDF_417 => Box::::default(), - BarcodeFormat::CODABAR => Box::::default(), + BarcodeFormat::CODABAR => Box::::default(), BarcodeFormat::DATA_MATRIX => Box::::default(), BarcodeFormat::AZTEC => Box::::default(), _ => { diff --git a/src/oned/coda_bar_writer.rs b/src/oned/coda_bar_writer.rs index 5b30f13..c3a9b38 100644 --- a/src/oned/coda_bar_writer.rs +++ b/src/oned/coda_bar_writer.rs @@ -172,8 +172,7 @@ mod CodaBarWriterTestCase { fn testEncode() { doTest( "B515-3/B", - &format!( - "{}{}{}{}{}{}{}{}{}{}", + concat!( "00000", "1001001011", "0110101001", @@ -192,16 +191,13 @@ mod CodaBarWriterTestCase { fn testEncode2() { doTest( "T123T", - &format!( - "{}{}{}{}{}{}{}", - "00000", - "1011001001", - "0101011001", - "0101001011", - "0110010101", - "01011001001", - "00000" - ), + concat!("00000", + "1011001001", + "0101011001", + "0101001011", + "0110010101", + "01011001001", + "00000"), ); }