Skip to content

Commit 682d0a6

Browse files
tottotoseanmonstar
authored andcommitted
refactor: Remove needless lifetime
1 parent 879d2d4 commit 682d0a6

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/common/cache_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ impl FromIterator<KnownDirective> for FromIter {
318318

319319
struct Fmt<'a>(&'a CacheControl);
320320

321-
impl<'a> fmt::Display for Fmt<'a> {
321+
impl fmt::Display for Fmt<'_> {
322322
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
323323
let if_flag = |f: Flags, dir: Directive| {
324324
if self.0.flags.contains(f) {

src/common/connection.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,21 @@ mod sealed {
108108
}
109109
pub trait Sealed {}
110110

111-
impl<'a> AsConnectionOption for &'a str {
111+
impl AsConnectionOption for &str {
112112
fn as_connection_option(&self) -> &str {
113113
self
114114
}
115115
}
116116

117-
impl<'a> Sealed for &'a str {}
117+
impl Sealed for &str {}
118118

119-
impl<'a> AsConnectionOption for &'a HeaderName {
119+
impl AsConnectionOption for &HeaderName {
120120
fn as_connection_option(&self) -> &str {
121121
self.as_ref()
122122
}
123123
}
124124

125-
impl<'a> Sealed for &'a HeaderName {}
125+
impl Sealed for &HeaderName {}
126126

127127
impl AsConnectionOption for HeaderName {
128128
fn as_connection_option(&self) -> &str {

src/common/content_encoding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ mod sealed {
8989
fn as_coding(&self) -> &str;
9090
}
9191

92-
impl<'a> AsCoding for &'a str {}
92+
impl AsCoding for &str {}
9393

94-
impl<'a> Sealed for &'a str {
94+
impl Sealed for &str {
9595
fn as_coding(&self) -> &str {
9696
self
9797
}

src/common/content_range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Header for ContentRange {
146146
fn encode<E: Extend<HeaderValue>>(&self, values: &mut E) {
147147
struct Adapter<'a>(&'a ContentRange);
148148

149-
impl<'a> fmt::Display for Adapter<'a> {
149+
impl fmt::Display for Adapter<'_> {
150150
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
151151
f.write_str("bytes ")?;
152152

src/common/strict_transport_security.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl Header for StrictTransportSecurity {
147147
fn encode<E: Extend<HeaderValue>>(&self, values: &mut E) {
148148
struct Adapter<'a>(&'a StrictTransportSecurity);
149149

150-
impl<'a> fmt::Display for Adapter<'a> {
150+
impl fmt::Display for Adapter<'_> {
151151
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
152152
if self.0.include_subdomains {
153153
write!(f, "max-age={}; includeSubdomains", self.0.max_age)

src/map_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ enum State<'a> {
6161
Tmp,
6262
}
6363

64-
impl<'a> Extend<HeaderValue> for ToValues<'a> {
64+
impl Extend<HeaderValue> for ToValues<'_> {
6565
fn extend<T: IntoIterator<Item = HeaderValue>>(&mut self, iter: T) {
6666
for value in iter {
6767
let entry = match ::std::mem::replace(&mut self.state, State::Tmp) {

0 commit comments

Comments
 (0)