Skip to content

Commit

Permalink
release: 0.2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Nov 29, 2024
2 parents 196beec + 6dae85a commit 3381522
Show file tree
Hide file tree
Showing 20 changed files with 323 additions and 163 deletions.
104 changes: 73 additions & 31 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,80 @@
# Project Dependencies
Package: riprip
Version: 0.2.10
Generated: 2024-10-18 02:34:12 UTC
Version: 0.2.11
Target: x86_64-unknown-linux-gnu
Generated: 2024-11-29 04:39:11 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:[email protected]) | Apache-2.0 or MIT |
| [argyle](https://github.com/Blobfolio/argyle) | 0.10.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [block-buffer](https://github.com/RustCrypto/utils) | 0.10.4 | RustCrypto Developers | Apache-2.0 or MIT |
| [bytecount](https://github.com/llogiq/bytecount) | 0.6.8 | [Andre Bogus](mailto:[email protected]) and [Joshua Landau](mailto:[email protected]) | Apache-2.0 or MIT |
| [cdtoc](https://github.com/Blobfolio/cdtoc) | 0.5.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [crc32fast](https://github.com/srijs/rust-crc32fast) | 1.4.2 | [Sam Rijs](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | Apache-2.0 or MIT |
| [crypto-common](https://github.com/RustCrypto/traits) | 0.1.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [ctrlc](https://github.com/Detegr/rust-ctrlc.git) | 3.4.5 | [Antti Keränen](mailto:[email protected]) | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.7.4 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [digest](https://github.com/RustCrypto/traits) | 0.10.7 | RustCrypto Developers | Apache-2.0 or MIT |
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.11 | [Tom Kaitchuck](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**argyle**](https://github.com/Blobfolio/argyle) | 0.10.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [bindgen](https://github.com/rust-lang/rust-bindgen) ⚒️ | 0.69.5 | [Jyun-Yan You](mailto:[email protected]), [Emilio Cobos Álvarez](mailto:[email protected]), [Nick Fitzgerald](mailto:[email protected]), and The Servo project developers | BSD-3-Clause |
| [bitflags](https://github.com/bitflags/bitflags) | 2.6.0 | The Rust Project Developers | MIT OR Apache-2.0 |
| [block-buffer](https://github.com/RustCrypto/utils) | 0.10.4 | RustCrypto Developers | MIT OR Apache-2.0 |
| [bytecount](https://github.com/llogiq/bytecount) | 0.6.8 | [Andre Bogus](mailto:[email protected]) and [Joshua Landau](mailto:[email protected]) | Apache-2.0 OR MIT |
| [byteorder](https://github.com/BurntSushi/byteorder) | 1.5.0 | [Andrew Gallant](mailto:[email protected]) | Unlicense OR MIT |
| [**cdtoc**](https://github.com/Blobfolio/cdtoc) | 0.5.3 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [cexpr](https://github.com/jethrogb/rust-cexpr) ⚒️ | 0.6.0 | [Jethro Beekman](mailto:[email protected]) | Apache-2.0 OR MIT |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
| [cfg_aliases](https://github.com/katharostech/cfg_aliases) ⚒️ | 0.2.1 | [Zicklag](mailto:[email protected]) | MIT |
| [clang-sys](https://github.com/KyleMayes/clang-sys) ⚒️ | 1.8.1 | [Kyle Mayes](mailto:[email protected]) | Apache-2.0 |
| [cpufeatures](https://github.com/RustCrypto/utils) | 0.2.16 | RustCrypto Developers | MIT OR Apache-2.0 |
| [**crc32fast**](https://github.com/srijs/rust-crc32fast) | 1.4.2 | [Sam Rijs](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
| [crypto-common](https://github.com/RustCrypto/traits) | 0.1.6 | RustCrypto Developers | MIT OR Apache-2.0 |
| [**ctrlc**](https://github.com/Detegr/rust-ctrlc.git) | 3.4.5 | [Antti Keränen](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.8.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [digest](https://github.com/RustCrypto/traits) | 0.10.7 | RustCrypto Developers | MIT OR Apache-2.0 |
| [either](https://github.com/rayon-rs/either) ⚒️ | 1.13.0 | bluss | MIT OR Apache-2.0 |
| [faster-hex](https://github.com/NervosFoundation/faster-hex) | 0.10.0 | [zhangsoledad](mailto:[email protected]) | MIT |
| [fastrand](https://github.com/smol-rs/fastrand) | 2.1.1 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 or MIT |
| [fyi_msg](https://github.com/Blobfolio/fyi) | 1.1.1 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [fastrand](https://github.com/smol-rs/fastrand) | 2.2.0 | [Stjepan Glavina](mailto:[email protected]) | Apache-2.0 OR MIT |
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 1.3.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
| [generic-array](https://github.com/fizyk20/generic-array.git) | 0.14.7 | [Bartłomiej Kamiński](mailto:[email protected]) and [Aaron Trent](mailto:[email protected]) | MIT |
| [itoa](https://github.com/dtolnay/itoa) | 1.0.11 | [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
| [libcdio-sys](https://github.com/MonterraByte/libcdio-sys) | 0.5.1 | [Joaquim Monteiro](mailto:[email protected]) | GPL-3.0+ |
| [log](https://github.com/rust-lang/log) | 0.4.22 | The Rust Project Developers | Apache-2.0 or MIT |
| [minreq](https://github.com/neonmoe/minreq) | 2.12.0 | [Jens Pitkanen](mailto:[email protected]) | ISC |
| [once_cell](https://github.com/matklad/once_cell) | 1.20.2 | [Aleksey Kladov](mailto:[email protected]) | Apache-2.0 or MIT |
| [oxford_join](https://github.com/Blobfolio/oxford_join) | 0.4.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [riprip_core](https://github.com/Blobfolio/riprip) | 0.2.10 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [serde](https://github.com/serde-rs/serde) | 1.0.210 | [Erick Tryzelaar](mailto:[email protected]) and [David Tolnay](mailto:[email protected]) | Apache-2.0 or MIT |
| [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [tempfile](https://github.com/Stebalien/tempfile) | 3.13.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | Apache-2.0 or MIT |
| [terminal_size](https://github.com/eminence/terminal-size) | 0.4.0 | [Andrew Chin](mailto:[email protected]) | Apache-2.0 or MIT |
| [trimothy](https://github.com/Blobfolio/trimothy) | 0.3.1 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [typenum](https://github.com/paholg/typenum) | 1.17.0 | [Paho Lurie-Gregg](mailto:[email protected]) and [Andre Bogus](mailto:[email protected]) | Apache-2.0 or MIT |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | 0.2.0 | [kwantam](mailto:[email protected]) and [Manish Goregaokar](mailto:[email protected]) | Apache-2.0 or MIT |
| [utc2k](https://github.com/Blobfolio/utc2k) | 0.10.0 | [Blobfolio, LLC.](mailto:[email protected]) | WTFPL |
| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | Apache-2.0, BSD-2-Clause, or MIT |
| [glob](https://github.com/rust-lang/glob) ⚒️ | 0.3.1 | The Rust Project Developers | MIT OR Apache-2.0 |
| [hash32](https://github.com/japaric/hash32) | 0.3.1 | [Jorge Aparicio](mailto:[email protected]) | MIT OR Apache-2.0 |
| [heapless](https://github.com/rust-embedded/heapless) | 0.8.0 | [Jorge Aparicio](mailto:[email protected]), [Per Lindgren](mailto:[email protected]), and [Emil Fresk](mailto:[email protected]) | MIT OR Apache-2.0 |
| [home](https://github.com/rust-lang/cargo) ⚒️ | 0.5.9 | [Brian Anderson](mailto:[email protected]) | MIT OR Apache-2.0 |
| [itertools](https://github.com/rust-itertools/itertools) ⚒️ | 0.12.1 | bluss | MIT OR Apache-2.0 |
| [itoa](https://github.com/dtolnay/itoa) | 1.0.14 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) ⚒️ | 1.5.0 | [Marvin Löbel](mailto:[email protected]) | MIT OR Apache-2.0 |
| [lazycell](https://github.com/indiv0/lazycell) ⚒️ | 1.3.0 | [Alex Crichton](mailto:[email protected]) and [Nikita Pekin](mailto:[email protected]) | MIT OR Apache-2.0 |
| [libc](https://github.com/rust-lang/libc) | 0.2.166 | The Rust Project Developers | MIT OR Apache-2.0 |
| [**libcdio-sys**](https://github.com/MonterraByte/libcdio-sys) | 0.5.1 | [Joaquim Monteiro](mailto:[email protected]) | GPL-3.0+ |
| [libloading](https://github.com/nagisa/rust_libloading/) ⚒️ | 0.8.5 | [Simonas Kazlauskas](mailto:[email protected]) | ISC |
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.4.14 | [Dan Gohman](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
| [log](https://github.com/rust-lang/log) | 0.4.22 | The Rust Project Developers | MIT OR Apache-2.0 |
| [memchr](https://github.com/BurntSushi/memchr) ⚒️ | 2.7.4 | [Andrew Gallant](mailto:[email protected]) and bluss | Unlicense OR MIT |
| [minimal-lexical](https://github.com/Alexhuszagh/minimal-lexical) ⚒️ | 0.2.1 | [Alex Huszagh](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**minreq**](https://github.com/neonmoe/minreq) | 2.12.0 | [Jens Pitkanen](mailto:[email protected]) | ISC |
| [nix](https://github.com/nix-rust/nix) | 0.29.0 | The nix-rust Project Developers | MIT |
| [nom](https://github.com/Geal/nom) ⚒️ | 7.1.3 | [email protected] | MIT |
| [once_cell](https://github.com/matklad/once_cell) | 1.20.2 | [Aleksey Kladov](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**oxford_join**](https://github.com/Blobfolio/oxford_join) | 0.4.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [prettyplease](https://github.com/dtolnay/prettyplease) ⚒️ | 0.2.25 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) ⚒️ | 1.0.92 | [David Tolnay](mailto:[email protected]) and [Alex Crichton](mailto:[email protected]) | MIT OR Apache-2.0 |
| [quote](https://github.com/dtolnay/quote) ⚒️ | 1.0.37 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [regex](https://github.com/rust-lang/regex) ⚒️ | 1.11.1 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
| [regex-automata](https://github.com/rust-lang/regex/tree/master/regex-automata) ⚒️ | 0.4.9 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
| [regex-syntax](https://github.com/rust-lang/regex/tree/master/regex-syntax) ⚒️ | 0.8.5 | The Rust Project Developers and [Andrew Gallant](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**riprip_core**](https://github.com/Blobfolio/riprip) | 0.2.11 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [rustc-hash](https://github.com/rust-lang-nursery/rustc-hash) ⚒️ | 1.1.0 | The Rust Project Developers | Apache-2.0 OR MIT |
| [rustix](https://github.com/bytecodealliance/rustix) | 0.38.41 | [Dan Gohman](mailto:[email protected]) and [Jakub Konka](mailto:[email protected]) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
| [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | MIT OR Apache-2.0 |
| [shlex](https://github.com/comex/rust-shlex) ⚒️ | 1.3.0 | [comex](mailto:[email protected]), [Fenhl](mailto:[email protected]), [Adrian Taylor](mailto:[email protected]), [Alex Touchet](mailto:[email protected]), [Daniel Parks](mailto:dp+[email protected]), and [Garrett Berg](mailto:[email protected]) | MIT OR Apache-2.0 |
| [stable_deref_trait](https://github.com/storyyeller/stable_deref_trait) | 1.2.0 | [Robert Grosse](mailto:[email protected]) | MIT OR Apache-2.0 |
| [syn](https://github.com/dtolnay/syn) ⚒️ | 2.0.89 | [David Tolnay](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**tempfile**](https://github.com/Stebalien/tempfile) | 3.14.0 | [Steven Allen](mailto:[email protected]), The Rust Project Developers, [Ashley Mannix](mailto:[email protected]), and [Jason White](mailto:[email protected]) | MIT OR Apache-2.0 |
| [terminal_size](https://github.com/eminence/terminal-size) | 0.4.0 | [Andrew Chin](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**trimothy**](https://github.com/Blobfolio/trimothy) | 0.6.0 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [typenum](https://github.com/paholg/typenum) | 1.17.0 | [Paho Lurie-Gregg](mailto:[email protected]) and [Andre Bogus](mailto:[email protected]) | MIT OR Apache-2.0 |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) ⚒️ | 1.0.14 | [David Tolnay](mailto:[email protected]) | (MIT OR Apache-2.0) AND Unicode-3.0 |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | 0.2.0 | [kwantam](mailto:[email protected]) and [Manish Goregaokar](mailto:[email protected]) | MIT OR Apache-2.0 |
| [**utc2k**](https://github.com/Blobfolio/utc2k) | 0.11.1 | [Josh Stoik](mailto:[email protected]) | WTFPL |
| [version_check](https://github.com/SergioBenitez/version_check) ⚒️ | 0.9.5 | [Sergio Benitez](mailto:[email protected]) | MIT OR Apache-2.0 |
| [which](https://github.com/harryfei/which-rs.git) ⚒️ | 4.4.2 | [Harry Fei](mailto:[email protected]) | MIT |
| [zerocopy](https://github.com/google/zerocopy) | 0.7.35 | [Joshua Liebow-Feeser](mailto:[email protected]) | BSD-2-Clause OR Apache-2.0 OR MIT |

### Legend

* **Direct Dependency**
* Child Dependency
* ⚒️ Build-Only
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,27 +181,3 @@ sudo apt-get install libcdio-dev
cd riprip
cargo build --release
```



## License

See also: [CREDITS.md](CREDITS.md)

Copyright © 2024 [Blobfolio, LLC](https://blobfolio.com) <[email protected]>

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export RUSTFLAGS := "-C target-cpu=x86-64-v3"

# Generate CREDITS.
@credits:
cargo bashman -m "{{ pkg_dir1 }}/Cargo.toml"
cargo bashman -m "{{ pkg_dir1 }}/Cargo.toml" -t x86_64-unknown-linux-gnu
just _fix-chown "{{ justfile_directory() }}/CREDITS.md"


Expand Down
4 changes: 2 additions & 2 deletions release/man/riprip.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.TH "RIP RIP HOORAY!" "1" "October 2024" "riprip v0.2.10" "User Commands"
.TH "RIP RIP HOORAY!" "1" "November 2024" "riprip v0.2.11" "User Commands"
.SH NAME
RIP RIP HOORAY! \- Manual page for riprip v0.2.10.
RIP RIP HOORAY! \- Manual page for riprip v0.2.11.
.SH DESCRIPTION
A specialized audio CD\-ripper optimized for incremental data recovery.
.SS USAGE:
Expand Down
10 changes: 5 additions & 5 deletions riprip/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "riprip"
version = "0.2.10"
version = "0.2.11"
license = "WTFPL"
authors = ["Josh Stoik <[email protected]>"]
edition = "2021"
Expand All @@ -10,7 +10,7 @@ readme = "README.md"
publish = false

[package.metadata.deb]
maintainer = "Josh Stoik <hello@blobfolio.com>"
maintainer = "Josh Stoik <josh@blobfolio.com>"
copyright = "2024, Blobfolio, LLC <[email protected]>"
license-file = ["../LICENSE", "0"]
revision = "1"
Expand Down Expand Up @@ -131,12 +131,12 @@ argyle = "0.10.*"
[dependencies]
argyle = "0.10.*"
ctrlc = "=3.4.5"
dactyl = "0.7.*"
dactyl = "0.8.*"
oxford_join = "0.4.*"
utc2k = "0.10.*"
utc2k = "0.11.*"

[dependencies.fyi_msg]
version = "1.1.*"
version = "1.3.*"
features = [ "progress" ]

[dependencies.riprip_core]
Expand Down
2 changes: 2 additions & 0 deletions riprip/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use std::path::PathBuf;

/// # Set Up CLI Arguments.
pub fn main() {
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION");

let mut builder = KeyWordsBuilder::default();
builder.push_keys([
"--backward", "--backwards",
Expand Down
2 changes: 2 additions & 0 deletions riprip/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ fn parse_rip_option_reread(v: &[u8]) -> Result<(u8, u8), RipRipError> {
// If there's a comma, there could be up to two values. Keep the
// default if either is omitted.
let v = v.trim_ascii();
// TODO: use split_once once stable.
if let Some(pos) = v.iter().position(|b| b','.eq(b)) {
let tmp = &v[..pos];
if ! tmp.is_empty() {
Expand All @@ -168,6 +169,7 @@ fn parse_rip_option_tracks(disc: &Disc, mut opts: RipOptions, tracks: &str)
if v.is_empty() { continue; }

// It might be a range.
// TODO: use split_once once stable.
if let Some(pos) = v.iter().position(|b| b'-'.eq(b)) {
// Split.
let a = v[..pos].trim_ascii();
Expand Down
4 changes: 2 additions & 2 deletions riprip/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const DIVIDER: &str = "------------------------";
///
/// This lets us bubble up startup errors so they can be pretty-printed.
fn main() {
match _main() {
match main__() {
Ok(()) => {},
Err(e @ (RipRipError::PrintHelp | RipRipError::PrintVersion)) => {
println!("{e}");
Expand All @@ -115,7 +115,7 @@ fn main() {
/// # Actual Main.
///
/// This does all the stuff.
fn _main() -> Result<(), RipRipError> {
fn main__() -> Result<(), RipRipError> {
let (
opts,
disc,
Expand Down
12 changes: 6 additions & 6 deletions riprip_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "riprip_core"
version = "0.2.10"
version = "0.2.11"
license = "WTFPL"
authors = ["Josh Stoik <[email protected]>"]
edition = "2021"
Expand All @@ -12,14 +12,14 @@ publish = false
[dependencies]
cdtoc = "0.5.*"
crc32fast = "=1.4.2"
dactyl = "0.7.*"
dactyl = "0.8.*"
oxford_join = "0.4.*"
tempfile = "3.8.0"
trimothy = "0.3.*"
utc2k = "0.10.*"
trimothy = "0.6.*"
utc2k = "0.11.*"

[dependencies.fyi_msg]
version = "1.1.*"
version = "1.3.*"
features = [ "progress" ]

[dependencies.libcdio-sys]
Expand All @@ -34,7 +34,7 @@ default-features = false
# reason so we don't need any minreq features at all!

[build-dependencies]
dactyl = "0.7.*"
dactyl = "0.8.*"
oxford_join = "0.4.*"

[build-dependencies.cdtoc]
Expand Down
2 changes: 1 addition & 1 deletion riprip_core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn nice_offsets(parsed: BTreeMap<VendorModel, i16>) -> String {
format!(
r#"
/// # Drive Offsets.
const DRIVE_OFFSETS: [(DriveVendorModel, ReadOffset); {}] = [
static DRIVE_OFFSETS: [(DriveVendorModel, ReadOffset); {}] = [
{},
];
"#,
Expand Down
4 changes: 2 additions & 2 deletions riprip_core/src/barcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ impl TryFrom<&[u8]> for Barcode {
type Error = RipRipError;
fn try_from(mut src: &[u8]) -> Result<Self, Self::Error> {
// Remove whitespace, leading *ASCII* zeroes, and trailing nulls.
src = src.trim_start_matches(|b| b.is_ascii_whitespace() || b == b'0');
src = src.trim_end_matches(|b| b.is_ascii_whitespace() || b == 0);
src = src.trim_start_matches(|b: u8| b.is_ascii_whitespace() || b == b'0');
src = src.trim_end_matches(|b: u8| b.is_ascii_whitespace() || b == 0);

// Make sure we've got 8-13 ASCII digits and nothing else.
if ! (8..=13).contains(&src.len()) || ! src.iter().all(u8::is_ascii_digit) {
Expand Down
Loading

0 comments on commit 3381522

Please sign in to comment.