Skip to content

Commit 66fb0ae

Browse files
cpudjc
authored andcommitted
proj: fix clippy 1.83 findings
Applies the result of `clippy --fix`.
1 parent 409d874 commit 66fb0ae

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async fn main() -> Result<(), Box<dyn StdError + Send + Sync + 'static>> {
4444

4545
let mut root_cert_store = rustls::RootCertStore::empty();
4646
if let Some(cafile) = &options.cafile {
47-
for cert in CertificateDer::pem_file_iter(&cafile)? {
47+
for cert in CertificateDer::pem_file_iter(cafile)? {
4848
root_cert_store.add(cert?)?;
4949
}
5050
} else {

src/common/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ where
181181
}
182182
}
183183

184-
impl<'a, IO: AsyncRead + AsyncWrite + Unpin, C, SD> AsyncRead for Stream<'a, IO, C>
184+
impl<IO: AsyncRead + AsyncWrite + Unpin, C, SD> AsyncRead for Stream<'_, IO, C>
185185
where
186186
C: DerefMut + Deref<Target = ConnectionCommon<SD>>,
187187
SD: SideData,
@@ -241,7 +241,7 @@ where
241241
}
242242
}
243243

244-
impl<'a, IO: AsyncRead + AsyncWrite + Unpin, C, SD> AsyncWrite for Stream<'a, IO, C>
244+
impl<IO: AsyncRead + AsyncWrite + Unpin, C, SD> AsyncWrite for Stream<'_, IO, C>
245245
where
246246
C: DerefMut + Deref<Target = ConnectionCommon<SD>>,
247247
SD: SideData,
@@ -350,7 +350,7 @@ pub struct SyncReadAdapter<'a, 'b, T> {
350350
pub cx: &'a mut Context<'b>,
351351
}
352352

353-
impl<'a, 'b, T: AsyncRead + Unpin> Read for SyncReadAdapter<'a, 'b, T> {
353+
impl<T: AsyncRead + Unpin> Read for SyncReadAdapter<'_, '_, T> {
354354
#[inline]
355355
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
356356
let mut buf = ReadBuf::new(buf);
@@ -371,7 +371,7 @@ pub struct SyncWriteAdapter<'a, 'b, T> {
371371
pub cx: &'a mut Context<'b>,
372372
}
373373

374-
impl<'a, 'b, T: Unpin> SyncWriteAdapter<'a, 'b, T> {
374+
impl<T: Unpin> SyncWriteAdapter<'_, '_, T> {
375375
#[inline]
376376
fn poll_with<U>(
377377
&mut self,
@@ -384,7 +384,7 @@ impl<'a, 'b, T: Unpin> SyncWriteAdapter<'a, 'b, T> {
384384
}
385385
}
386386

387-
impl<'a, 'b, T: AsyncWrite + Unpin> Write for SyncWriteAdapter<'a, 'b, T> {
387+
impl<T: AsyncWrite + Unpin> Write for SyncWriteAdapter<'_, '_, T> {
388388
#[inline]
389389
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
390390
self.poll_with(|io, cx| io.poll_write(cx, buf))

src/common/test_stream.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use super::Stream;
1313

1414
struct Good<'a>(&'a mut Connection);
1515

16-
impl<'a> AsyncRead for Good<'a> {
16+
impl AsyncRead for Good<'_> {
1717
fn poll_read(
1818
mut self: Pin<&mut Self>,
1919
_cx: &mut Context<'_>,
@@ -31,7 +31,7 @@ impl<'a> AsyncRead for Good<'a> {
3131
}
3232
}
3333

34-
impl<'a> AsyncWrite for Good<'a> {
34+
impl AsyncWrite for Good<'_> {
3535
fn poll_write(
3636
mut self: Pin<&mut Self>,
3737
_cx: &mut Context<'_>,

tests/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod utils {
2424
let key = PrivateKeyDer::from_pem_slice(EE_KEY.as_bytes()).unwrap();
2525
let sconfig = ServerConfig::builder()
2626
.with_no_client_auth()
27-
.with_single_cert(cert, key.into())
27+
.with_single_cert(cert, key)
2828
.unwrap();
2929

3030
let mut client_root_cert_store = RootCertStore::empty();

0 commit comments

Comments
 (0)