Skip to content

Commit 0d64a32

Browse files
committed
Incorporate clippy suggestions
Clippy suggests to elide lifetimes from various impls when they are not used. Follow the suggestions.
1 parent 5f1c308 commit 0d64a32

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/api/v2/de.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub(crate) enum Content<'de> {
7373
Map(Vec<(Content<'de>, Content<'de>)>),
7474
}
7575

76-
impl<'de> Content<'de> {
76+
impl Content<'_> {
7777
#[cold]
7878
fn unexpected(&self) -> Unexpected<'_> {
7979
match *self {
@@ -116,7 +116,7 @@ struct ContentVisitor<'de> {
116116
value: PhantomData<Content<'de>>,
117117
}
118118

119-
impl<'de> ContentVisitor<'de> {
119+
impl ContentVisitor<'_> {
120120
fn new() -> Self {
121121
ContentVisitor { value: PhantomData }
122122
}
@@ -843,7 +843,7 @@ pub(crate) struct TaggedContentVisitor<'de, T> {
843843
value: PhantomData<TaggedContent<'de, T>>,
844844
}
845845

846-
impl<'de, T> TaggedContentVisitor<'de, T> {
846+
impl<T> TaggedContentVisitor<'_, T> {
847847
pub(crate) fn new(name: &'static str) -> Self {
848848
TaggedContentVisitor {
849849
tag_name: name,
@@ -931,7 +931,7 @@ struct TagOrContentVisitor<'de> {
931931
value: PhantomData<TagOrContent<'de>>,
932932
}
933933

934-
impl<'de> TagOrContentVisitor<'de> {
934+
impl TagOrContentVisitor<'_> {
935935
fn new(name: &'static str) -> Self {
936936
TagOrContentVisitor {
937937
name,

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct DebugHeaders<'h> {
5151
headers: &'h HeaderMap<HeaderValue>,
5252
}
5353

54-
impl<'h> Debug for DebugHeaders<'h> {
54+
impl Debug for DebugHeaders<'_> {
5555
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
5656
static MASKED: HeaderValue = HeaderValue::from_static("<masked>");
5757

@@ -74,7 +74,7 @@ struct DebugRequest<'r> {
7474
request: &'r Request<Full<Bytes>>,
7575
}
7676

77-
impl<'r> Debug for DebugRequest<'r> {
77+
impl Debug for DebugRequest<'_> {
7878
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
7979
// Note that we do not print URL and version, because we assume they
8080
// are already included as identifiers in the span of the usage

0 commit comments

Comments
 (0)