Skip to content

Commit

Permalink
CI: bump clippy to v1.84 (#1644)
Browse files Browse the repository at this point in the history
Also runs `cargo clippy --fix` to correct warnings
  • Loading branch information
tarcieri authored Feb 2, 2025
1 parent c2abed5 commit 4f15e2d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81.0
toolchain: 1.84.0
components: clippy
- run: cargo clippy --all --all-features --tests

doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand Down
2 changes: 1 addition & 1 deletion base64ct/src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl<'o, E: Encoding> Encoder<'o, E> {

/// Perform Base64 encoding operation.
fn perform_encode(&mut self, input: &[u8]) -> Result<usize, Error> {
let mut len = E::encode(input, self.remaining())?.as_bytes().len();
let mut len = E::encode(input, self.remaining())?.len();

// Insert newline characters into the output as needed
if let Some(line_wrapper) = &mut self.line_wrapper {
Expand Down
2 changes: 1 addition & 1 deletion cms/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ fn test_create_password_recipient_info() {
}
}
}
impl<'a> PwriEncryptor for Aes128CbcPwriEncryptor<'a> {
impl PwriEncryptor for Aes128CbcPwriEncryptor<'_> {
const BLOCK_LENGTH_BITS: usize = 128; // AES block length
fn encrypt_rfc3211(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion der/src/str_owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl StrOwned {
/// Create a new [`StrOwned`], ensuring that the byte representation of
/// the provided `str` value is shorter than `Length::max()`.
pub fn new(s: String) -> Result<Self> {
let length = Length::try_from(s.as_bytes().len())?;
let length = Length::try_from(s.len())?;

Ok(Self { inner: s, length })
}
Expand Down
2 changes: 1 addition & 1 deletion der/src/str_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl<'a> StrRef<'a> {
pub fn new(s: &'a str) -> Result<Self> {
Ok(Self {
inner: s,
length: Length::try_from(s.as_bytes().len())?,
length: Length::try_from(s.len())?,
})
}

Expand Down
4 changes: 2 additions & 2 deletions pem-rfc7468/src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ fn encapsulated_len_inner(
) -> Result<usize> {
[
PRE_ENCAPSULATION_BOUNDARY.len(),
label.as_bytes().len(),
label.len(),
ENCAPSULATION_BOUNDARY_DELIMITER.len(),
line_ending.len(),
base64_len,
line_ending.len(),
POST_ENCAPSULATION_BOUNDARY.len(),
label.as_bytes().len(),
label.len(),
ENCAPSULATION_BOUNDARY_DELIMITER.len(),
line_ending.len(),
]
Expand Down
2 changes: 1 addition & 1 deletion pkcs1/src/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl EncodeValue for OtherPrimeInfos<'_> {
}

#[cfg(not(feature = "alloc"))]
impl<'a> der::FixedTag for OtherPrimeInfos<'a> {
impl der::FixedTag for OtherPrimeInfos<'_> {
const TAG: Tag = Tag::Sequence;
}

Expand Down

0 comments on commit 4f15e2d

Please sign in to comment.