Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nugine committed Aug 21, 2023
1 parent 2eac350 commit 0419c95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions crates/base32-simd/tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ fn special() {
let base32 = BASE32;

for &input in inputs {
let mut buf: Vec<u8> = Vec::new();
buf.resize(base32.encoded_length(input.len()), 0);
let mut buf: Vec<u8> = vec![0; base32.encoded_length(input.len())];

let ans = base32.encode(input, buf.as_out()).unwrap();
assert!(base32.check(ans).is_ok());
Expand Down
8 changes: 5 additions & 3 deletions crates/hex-simd/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ macro_rules! ensure {
#[allow(unused_macros)]
macro_rules! try_ {
($result:expr) => {
match $result {
Ok(value) => value,
Err(_) => return Err(Error::new()),
{
match $result {
Ok(value) => value,
Err(()) => return Err(Error::new()),
}
}
};
}
2 changes: 1 addition & 1 deletion crates/uuid-simd/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ macro_rules! try_ {
($result:expr) => {
match $result {
Ok(value) => value,
Err(_) => return Err(Error::new()),
Err(()) => return Err(Error::new()),
}
};
}

0 comments on commit 0419c95

Please sign in to comment.