Skip to content

Commit 9008488

Browse files
committed
cipher: remove redundant call.
Nightly clippy is flagging a redundant call in `cipher.rs`: > call to `.deref()` on a reference in this situation does nothing This commit removes the call to `deref` and also the now unnecessary import of the `std::ops::Deref` trait.
1 parent 0e56fc7 commit 9008488

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cipher.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use crate::{
2222
ArcCastPtr, BoxCastPtr, CastConstPtr, CastPtr,
2323
};
2424
use rustls_result::{AlreadyUsed, NullParameter};
25-
use std::ops::Deref;
2625

2726
/// An X.509 certificate, as used in rustls.
2827
/// Corresponds to `Certificate` in the Rust API.
@@ -360,7 +359,7 @@ impl rustls_certified_key {
360359
}
361360
};
362361
let certified_key: &CertifiedKey = try_ref_from_ptr!(certified_key);
363-
let mut new_key = certified_key.deref().clone();
362+
let mut new_key = certified_key.clone();
364363
if !ocsp_response.is_null() {
365364
let ocsp_slice = unsafe{ &*ocsp_response };
366365
new_key.ocsp = Some(Vec::from(try_slice!(ocsp_slice.data, ocsp_slice.len)));

0 commit comments

Comments
 (0)