Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Mar 2, 2024
1 parent 320056a commit 98ab8d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmp/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn difference() {
assert_eq!(BASE64_STANDARD.decode(x).err().unwrap(), InvalidLastSymbol(2, b'B'));
let x = b"AA\nB=";
assert_eq!(BASE64.decode(x).err().unwrap(), DecodeError { position: 4, kind: Length });
assert_eq!(BASE64_STANDARD.decode(x).err().unwrap(), InvalidLength);
assert_eq!(BASE64_STANDARD.decode(x).err().unwrap(), InvalidByte(2, b'\n'));
let x = b"AAB";
assert_eq!(BASE64.decode(x).err().unwrap(), DecodeError { position: 0, kind: Length });
assert_eq!(BASE64_STANDARD.decode(x).err().unwrap(), InvalidPadding);
Expand Down
4 changes: 1 addition & 3 deletions lib/fuzz/examples/analyze.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(core_intrinsics)]

extern crate data_encoding;
extern crate data_encoding_fuzz;

Expand Down Expand Up @@ -77,7 +75,7 @@ impl Stat<usize> {
let encoding = generate_specification(&mut data).encoding().unwrap();
let spec = encoding.specification();
let mut stat = HashMap::new();
assert!(stat.insert(Key::Bit, std::intrinsics::cttz(spec.symbols.len())).is_none());
assert!(stat.insert(Key::Bit, spec.symbols.len().trailing_zeros() as usize).is_none());
assert!(stat
.insert(Key::Msb, (spec.bit_order == BitOrder::MostSignificantFirst) as usize)
.is_none());
Expand Down
2 changes: 1 addition & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
//! | Input | `data-encoding` | `base64` | GNU `base64` |
//! | ---------- | --------------- | --------- | ------------- |
//! | `AAB=` | `Trailing(2)` | `Last(2)` | `\x00\x00` |
//! | `AA\nB=` | `Length(4)` | `Length` | `\x00\x00` |
//! | `AA\nB=` | `Length(4)` | `Byte(2)` | `\x00\x00` |
//! | `AAB` | `Length(0)` | `Padding` | Invalid input |
//! | `AAA` | `Length(0)` | `Padding` | Invalid input |
//! | `A\rA\nB=` | `Length(4)` | `Byte(1)` | Invalid input |
Expand Down
2 changes: 1 addition & 1 deletion www/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ html:
cargo build --target wasm32-unknown-unknown --release
rsync -a --delete static/ html
wasm-bindgen --no-typescript --no-modules \
target/wasm32-unknown-unknown/release/data_encoding_www.wasm \
../target/wasm32-unknown-unknown/release/data_encoding_www.wasm \
--out-dir html

.PHONY: clean
Expand Down

0 comments on commit 98ab8d0

Please sign in to comment.