Skip to content

Commit 851aaf4

Browse files
committed
clippy: needless_lifetimes
1 parent 629eeaa commit 851aaf4

20 files changed

+41
-41
lines changed

lofty/src/id3/v1/tag.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ impl<'a> Into<Id3v1TagRef<'a>> for &'a Tag {
424424
}
425425
}
426426

427-
impl<'a> Id3v1TagRef<'a> {
427+
impl Id3v1TagRef<'_> {
428428
pub(super) fn is_empty(&self) -> bool {
429429
self.title.is_none()
430430
&& self.artist.is_none()

lofty/src/id3/v2/frame/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl<'a> Frame<'a> {
164164
}
165165
}
166166

167-
impl<'a> Frame<'a> {
167+
impl Frame<'_> {
168168
/// Check for empty content
169169
///
170170
/// Returns `None` if the frame type is not supported.
@@ -194,7 +194,7 @@ impl<'a> Frame<'a> {
194194
}
195195
}
196196

197-
impl<'a> Frame<'a> {
197+
impl Frame<'_> {
198198
pub(super) fn as_bytes(&self, is_id3v23: bool) -> Result<Vec<u8>> {
199199
Ok(match self {
200200
Frame::Comment(comment) => comment.as_bytes(is_id3v23)?,

lofty/src/id3/v2/frame/read.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) enum ParsedFrame<'a> {
1919
Eof,
2020
}
2121

22-
impl<'a> ParsedFrame<'a> {
22+
impl ParsedFrame<'_> {
2323
pub(crate) fn read<R>(
2424
reader: &mut R,
2525
version: Id3v2Version,

lofty/src/id3/v2/items/attached_picture_frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct AttachedPictureFrame<'a> {
2424
pub picture: Picture,
2525
}
2626

27-
impl<'a> AttachedPictureFrame<'a> {
27+
impl AttachedPictureFrame<'_> {
2828
/// Create a new [`AttachedPictureFrame`]
2929
pub fn new(encoding: TextEncoding, picture: Picture) -> Self {
3030
let header = FrameHeader::new(FRAME_ID, FrameFlags::default());

lofty/src/id3/v2/items/audio_text_frame.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ pub struct AudioTextFrame<'a> {
7171
pub audio_data: Vec<u8>,
7272
}
7373

74-
impl<'a> PartialEq for AudioTextFrame<'a> {
74+
impl PartialEq for AudioTextFrame<'_> {
7575
fn eq(&self, other: &Self) -> bool {
7676
self.equivalent_text == other.equivalent_text
7777
}
7878
}
7979

80-
impl<'a> Hash for AudioTextFrame<'a> {
80+
impl Hash for AudioTextFrame<'_> {
8181
fn hash<H: Hasher>(&self, state: &mut H) {
8282
self.equivalent_text.hash(state);
8383
}
8484
}
8585

86-
impl<'a> AudioTextFrame<'a> {
86+
impl AudioTextFrame<'_> {
8787
/// Create a new [`AudioTextFrame`]
8888
pub fn new(
8989
encoding: TextEncoding,

lofty/src/id3/v2/items/encapsulated_object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct GeneralEncapsulatedObject<'a> {
2222
pub data: Vec<u8>,
2323
}
2424

25-
impl<'a> GeneralEncapsulatedObject<'a> {
25+
impl GeneralEncapsulatedObject<'_> {
2626
/// Create a new [`GeneralEncapsulatedObject`]
2727
pub fn new(
2828
encoding: TextEncoding,

lofty/src/id3/v2/items/event_timing_codes_frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub struct EventTimingCodesFrame<'a> {
185185
pub events: Vec<Event>,
186186
}
187187

188-
impl<'a> EventTimingCodesFrame<'a> {
188+
impl EventTimingCodesFrame<'_> {
189189
/// Create a new [`EventTimingCodesFrame`]
190190
pub fn new(timestamp_format: TimestampFormat, events: Vec<Event>) -> Self {
191191
let header = FrameHeader::new(FRAME_ID, FrameFlags::default());

lofty/src/id3/v2/items/extended_text_frame.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ pub struct ExtendedTextFrame<'a> {
3232
pub content: String,
3333
}
3434

35-
impl<'a> PartialEq for ExtendedTextFrame<'a> {
35+
impl PartialEq for ExtendedTextFrame<'_> {
3636
fn eq(&self, other: &Self) -> bool {
3737
self.description == other.description
3838
}
3939
}
4040

41-
impl<'a> Hash for ExtendedTextFrame<'a> {
41+
impl Hash for ExtendedTextFrame<'_> {
4242
fn hash<H: Hasher>(&self, state: &mut H) {
4343
self.description.hash(state);
4444
}
4545
}
4646

47-
impl<'a> ExtendedTextFrame<'a> {
47+
impl ExtendedTextFrame<'_> {
4848
/// Create a new [`ExtendedTextFrame`]
4949
pub fn new(encoding: TextEncoding, description: String, content: String) -> Self {
5050
let header = FrameHeader::new(FRAME_ID, FrameFlags::default());

lofty/src/id3/v2/items/extended_url_frame.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ pub struct ExtendedUrlFrame<'a> {
2929
pub content: String,
3030
}
3131

32-
impl<'a> PartialEq for ExtendedUrlFrame<'a> {
32+
impl PartialEq for ExtendedUrlFrame<'_> {
3333
fn eq(&self, other: &Self) -> bool {
3434
self.description == other.description
3535
}
3636
}
3737

38-
impl<'a> Hash for ExtendedUrlFrame<'a> {
38+
impl Hash for ExtendedUrlFrame<'_> {
3939
fn hash<H: Hasher>(&self, state: &mut H) {
4040
self.description.hash(state);
4141
}
4242
}
4343

44-
impl<'a> ExtendedUrlFrame<'a> {
44+
impl ExtendedUrlFrame<'_> {
4545
/// Create a new [`ExtendedUrlFrame`]
4646
pub fn new(encoding: TextEncoding, description: String, content: String) -> Self {
4747
let header = FrameHeader::new(FRAME_ID, FrameFlags::default());

lofty/src/id3/v2/items/language_frame.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,20 @@ pub struct CommentFrame<'a> {
9191
pub content: String,
9292
}
9393

94-
impl<'a> PartialEq for CommentFrame<'a> {
94+
impl PartialEq for CommentFrame<'_> {
9595
fn eq(&self, other: &Self) -> bool {
9696
self.language == other.language && self.description == other.description
9797
}
9898
}
9999

100-
impl<'a> Hash for CommentFrame<'a> {
100+
impl Hash for CommentFrame<'_> {
101101
fn hash<H: Hasher>(&self, state: &mut H) {
102102
self.language.hash(state);
103103
self.description.hash(state);
104104
}
105105
}
106106

107-
impl<'a> CommentFrame<'a> {
107+
impl CommentFrame<'_> {
108108
const FRAME_ID: FrameId<'static> = FrameId::Valid(Cow::Borrowed("COMM"));
109109

110110
/// Create a new [`CommentFrame`]
@@ -207,20 +207,20 @@ pub struct UnsynchronizedTextFrame<'a> {
207207
pub content: String,
208208
}
209209

210-
impl<'a> PartialEq for UnsynchronizedTextFrame<'a> {
210+
impl PartialEq for UnsynchronizedTextFrame<'_> {
211211
fn eq(&self, other: &Self) -> bool {
212212
self.language == other.language && self.description == other.description
213213
}
214214
}
215215

216-
impl<'a> Hash for UnsynchronizedTextFrame<'a> {
216+
impl Hash for UnsynchronizedTextFrame<'_> {
217217
fn hash<H: Hasher>(&self, state: &mut H) {
218218
self.language.hash(state);
219219
self.description.hash(state);
220220
}
221221
}
222222

223-
impl<'a> UnsynchronizedTextFrame<'a> {
223+
impl UnsynchronizedTextFrame<'_> {
224224
const FRAME_ID: FrameId<'static> = FrameId::Valid(Cow::Borrowed("USLT"));
225225

226226
/// Create a new [`UnsynchronizedTextFrame`]

0 commit comments

Comments
 (0)