Skip to content

Commit

Permalink
Merge pull request #202 from marshallpierce/mp/edition-2021
Browse files Browse the repository at this point in the history
Update to edition 2021
  • Loading branch information
marshallpierce authored Dec 10, 2022
2 parents 766fbc9 + f58f441 commit 68919ae
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
keywords = ["base64", "utf8", "encode", "decode", "no_std"]
categories = ["encoding"]
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.57.0"

[[bench]]
Expand Down
1 change: 1 addition & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name = "base64-fuzz"
version = "0.0.1"
authors = ["Automatically generated"]
publish = false
edition = "2021"

[package.metadata]
cargo-fuzz = true
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzzers/decode_random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ fuzz_target!(|data: &[u8]| {

// The data probably isn't valid base64 input, but as long as it returns an error instead
// of crashing, that's correct behavior.
let _ = decode_engine(&data, &engine);
let _ = decode_engine(data, &engine);
});
2 changes: 1 addition & 1 deletion fuzz/fuzzers/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern crate base64;
use base64::engine::DEFAULT_ENGINE;

fuzz_target!(|data: &[u8]| {
let encoded = base64::encode_engine(&data, &DEFAULT_ENGINE);
let encoded = base64::encode_engine(data, &DEFAULT_ENGINE);
let decoded = base64::decode_engine(&encoded, &DEFAULT_ENGINE).unwrap();
assert_eq!(data, decoded.as_slice());
});
2 changes: 1 addition & 1 deletion fuzz/fuzzers/roundtrip_no_pad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fuzz_target!(|data: &[u8]| {
.with_decode_padding_mode(engine::DecodePaddingMode::RequireNone);
let engine = fast_portable::FastPortable::from(&base64::alphabet::STANDARD, config);

let encoded = base64::encode_engine(&data, &engine);
let encoded = base64::encode_engine(data, &engine);
let decoded = base64::decode_engine(&encoded, &engine).unwrap();
assert_eq!(data, decoded.as_slice());
});
2 changes: 1 addition & 1 deletion fuzz/fuzzers/roundtrip_random_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod utils;
fuzz_target!(|data: &[u8]| {
let engine = utils::random_engine(data);

let encoded = encode_engine(&data, &engine);
let encoded = encode_engine(data, &engine);
let decoded = decode_engine(&encoded, &engine).unwrap();
assert_eq!(data, decoded.as_slice());
});

0 comments on commit 68919ae

Please sign in to comment.