Skip to content

Commit 5a3fcdb

Browse files
authored
Minor cargo clippy (nightly) fixes (#1928)
1 parent 47e8b0e commit 5a3fcdb

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

der/src/asn1/octet_string.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ mod tests {
382382
const EXAMPLE_BER: &[u8] = &hex!(
383383
"2480" // Constructed indefinite length OCTET STRING
384384
"040648656c6c6f2c" // Segment containing "Hello,"
385-
"040620776f726c64" // Segment containing "world"
385+
"040620776f726c64" // Segment containing " world"
386386
"0000" // End-of-contents marker
387387
);
388388

@@ -405,7 +405,7 @@ mod tests {
405405
"A080" // indefinite length explicit tag
406406
"2480" // Constructed indefinite length OCTET STRING
407407
"040648656c6c6f2c" // Segment containing "Hello,"
408-
"040620776f726c64" // Segment containing "world"
408+
"040620776f726c64" // Segment containing " world"
409409
"0000" // End-of-contents marker
410410
"0000" // End-of-contents marker
411411
);
@@ -435,7 +435,7 @@ mod tests {
435435
const EXAMPLE_BER: &[u8] = &hex!(
436436
"A080" // implicit tag, constructed indefinite length OCTET STRING
437437
"040648656c6c6f2c" // Segment containing "Hello,"
438-
"040620776f726c64" // Segment containing "world"
438+
"040620776f726c64" // Segment containing " world"
439439
"0000" // End-of-contents marker
440440
);
441441

der/tests/derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ mod choice {
195195
obj.encode(&mut encoder).unwrap();
196196

197197
let encoded = encoder.finish().unwrap();
198-
println!("encoded: {:02X?}", encoded);
198+
println!("encoded: {encoded:02X?}");
199199

200200
let decoded = ImplicitChoice::from_der(encoded).unwrap();
201201

mcf/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl McfHash {
122122
}
123123

124124
/// Get an [`McfHashRef`] which corresponds to this owned [`McfHash`].
125-
pub fn as_mcf_hash_ref(&self) -> McfHashRef {
125+
pub fn as_mcf_hash_ref(&self) -> McfHashRef<'_> {
126126
McfHashRef(self.as_str())
127127
}
128128

@@ -133,7 +133,7 @@ impl McfHash {
133133

134134
/// Get an iterator over the parts of the password hash as delimited by `$`, excluding the
135135
/// initial identifier.
136-
pub fn fields(&self) -> Fields {
136+
pub fn fields(&self) -> Fields<'_> {
137137
self.as_mcf_hash_ref().fields()
138138
}
139139

x509-cert/tests/builder_crl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn crl_verify() {
176176
.as_bytes(),
177177
);
178178
assert_eq!(status.code(), Some(2));
179-
println!("{}", verification_output);
180-
println!("{}", verification_stderr);
179+
println!("{verification_output}");
180+
println!("{verification_stderr}");
181181
assert!(verification_stderr.contains("certificate revoked"));
182182
}

0 commit comments

Comments
 (0)