Skip to content

Commit

Permalink
CI: bump clippy to 1.84 (#550)
Browse files Browse the repository at this point in the history
Also runs `cargo clippy --fix`
  • Loading branch information
tarcieri authored Jan 20, 2025
1 parent eeefe4b commit 92b4e9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81.0
toolchain: 1.84.0
components: clippy
- run: cargo clippy --all -- -D warnings

Expand Down
4 changes: 2 additions & 2 deletions argon2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@ impl PasswordHasher for Argon2<'_> {
}
}

impl<'key> From<Params> for Argon2<'key> {
impl From<Params> for Argon2<'_> {
fn from(params: Params) -> Self {
Self::new(Algorithm::default(), Version::default(), params)
}
}

impl<'key> From<&Params> for Argon2<'key> {
impl From<&Params> for Argon2<'_> {
fn from(params: &Params) -> Self {
Self::from(params.clone())
}
Expand Down
2 changes: 1 addition & 1 deletion balloon-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ where
}
}

impl<'key, D: Digest + FixedOutputReset> From<Params> for Balloon<'key, D>
impl<D: Digest + FixedOutputReset> From<Params> for Balloon<'_, D>
where
Array<u8, D::OutputSize>: ArrayDecoding,
{
Expand Down
4 changes: 2 additions & 2 deletions bcrypt-pbkdf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn bcrypt_pbkdf(
const STACK_STRIDE: usize = 8;

// Allocate a Vec large enough to hold the output we require.
let stride = (output.len() + BHASH_OUTPUT_SIZE - 1) / BHASH_OUTPUT_SIZE;
let stride = output.len().div_ceil(BHASH_OUTPUT_SIZE);

let mut vec_buf;
let mut stack_buf = [0u8; STACK_STRIDE * BHASH_OUTPUT_SIZE];
Expand Down Expand Up @@ -172,7 +172,7 @@ pub fn bcrypt_pbkdf_with_memory(
output: &mut [u8],
memory: &mut [u8],
) -> Result<(), Error> {
let stride = (output.len() + BHASH_OUTPUT_SIZE - 1) / BHASH_OUTPUT_SIZE;
let stride = output.len().div_ceil(BHASH_OUTPUT_SIZE);

// Validate inputs in same way as OpenSSH implementation
let passphrase = passphrase.as_ref();
Expand Down

0 comments on commit 92b4e9b

Please sign in to comment.