Skip to content

Commit 4f15e2d

Browse files
authored
CI: bump clippy to v1.84 (#1644)
Also runs `cargo clippy --fix` to correct warnings
1 parent c2abed5 commit 4f15e2d

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

.github/workflows/workspace.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- uses: dtolnay/rust-toolchain@master
2323
with:
24-
toolchain: 1.81.0
24+
toolchain: 1.84.0
2525
components: clippy
2626
- run: cargo clippy --all --all-features --tests
2727

2828
doc:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v4
32-
32+
3333
- uses: dtolnay/rust-toolchain@master
3434
with:
3535
toolchain: stable

base64ct/src/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl<'o, E: Encoding> Encoder<'o, E> {
153153

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

158158
// Insert newline characters into the output as needed
159159
if let Some(line_wrapper) = &mut self.line_wrapper {

cms/tests/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ fn test_create_password_recipient_info() {
700700
}
701701
}
702702
}
703-
impl<'a> PwriEncryptor for Aes128CbcPwriEncryptor<'a> {
703+
impl PwriEncryptor for Aes128CbcPwriEncryptor<'_> {
704704
const BLOCK_LENGTH_BITS: usize = 128; // AES block length
705705
fn encrypt_rfc3211(
706706
&mut self,

der/src/str_owned.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl StrOwned {
2222
/// Create a new [`StrOwned`], ensuring that the byte representation of
2323
/// the provided `str` value is shorter than `Length::max()`.
2424
pub fn new(s: String) -> Result<Self> {
25-
let length = Length::try_from(s.as_bytes().len())?;
25+
let length = Length::try_from(s.len())?;
2626

2727
Ok(Self { inner: s, length })
2828
}

der/src/str_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl<'a> StrRef<'a> {
2020
pub fn new(s: &'a str) -> Result<Self> {
2121
Ok(Self {
2222
inner: s,
23-
length: Length::try_from(s.as_bytes().len())?,
23+
length: Length::try_from(s.len())?,
2424
})
2525
}
2626

pem-rfc7468/src/encoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ fn encapsulated_len_inner(
135135
) -> Result<usize> {
136136
[
137137
PRE_ENCAPSULATION_BOUNDARY.len(),
138-
label.as_bytes().len(),
138+
label.len(),
139139
ENCAPSULATION_BOUNDARY_DELIMITER.len(),
140140
line_ending.len(),
141141
base64_len,
142142
line_ending.len(),
143143
POST_ENCAPSULATION_BOUNDARY.len(),
144-
label.as_bytes().len(),
144+
label.len(),
145145
ENCAPSULATION_BOUNDARY_DELIMITER.len(),
146146
line_ending.len(),
147147
]

pkcs1/src/private_key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl EncodeValue for OtherPrimeInfos<'_> {
250250
}
251251

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

0 commit comments

Comments
 (0)