diff --git a/axum-extra/src/extract/cookie/private.rs b/axum-extra/src/extract/cookie/private.rs index 3a7d0beee6..937d73e6b8 100644 --- a/axum-extra/src/extract/cookie/private.rs +++ b/axum-extra/src/extract/cookie/private.rs @@ -289,7 +289,7 @@ struct PrivateCookieJarIter<'a, K> { iter: cookie::Iter<'a>, } -impl<'a, K> Iterator for PrivateCookieJarIter<'a, K> { +impl Iterator for PrivateCookieJarIter<'_, K> { type Item = Cookie<'static>; fn next(&mut self) -> Option { diff --git a/axum-extra/src/extract/cookie/signed.rs b/axum-extra/src/extract/cookie/signed.rs index 87ba5444b5..92bf917145 100644 --- a/axum-extra/src/extract/cookie/signed.rs +++ b/axum-extra/src/extract/cookie/signed.rs @@ -307,7 +307,7 @@ struct SignedCookieJarIter<'a, K> { iter: cookie::Iter<'a>, } -impl<'a, K> Iterator for SignedCookieJarIter<'a, K> { +impl Iterator for SignedCookieJarIter<'_, K> { type Item = Cookie<'static>; fn next(&mut self) -> Option { diff --git a/axum/src/extract/multipart.rs b/axum/src/extract/multipart.rs index 38ebaf9be2..57d32f7563 100644 --- a/axum/src/extract/multipart.rs +++ b/axum/src/extract/multipart.rs @@ -107,7 +107,7 @@ pub struct Field<'a> { _multipart: &'a mut Multipart, } -impl<'a> Stream for Field<'a> { +impl Stream for Field<'_> { type Item = Result; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index f493d29776..d3ddf1fe6e 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -558,7 +558,7 @@ pub struct RouterAsService<'a, B, S = ()> { _marker: PhantomData, } -impl<'a, B> Service> for RouterAsService<'a, B, ()> +impl Service> for RouterAsService<'_, B, ()> where B: HttpBody + Send + 'static, B::Error: Into, @@ -578,7 +578,7 @@ where } } -impl<'a, B, S> fmt::Debug for RouterAsService<'a, B, S> +impl fmt::Debug for RouterAsService<'_, B, S> where S: fmt::Debug, { diff --git a/axum/src/test_helpers/tracing_helpers.rs b/axum/src/test_helpers/tracing_helpers.rs index 09800f8fb9..f7769ee9d7 100644 --- a/axum/src/test_helpers/tracing_helpers.rs +++ b/axum/src/test_helpers/tracing_helpers.rs @@ -112,7 +112,7 @@ impl<'a> MakeWriter<'a> for TestMakeWriter { struct Writer<'a>(&'a TestMakeWriter); -impl<'a> io::Write for Writer<'a> { +impl io::Write for Writer<'_> { fn write(&mut self, buf: &[u8]) -> io::Result { match &mut *self.0.write.lock().unwrap() { Some(vec) => {