Skip to content

Commit e79aa08

Browse files
committed
Clippy: Fix needless_pass_by_value
1 parent ec4e66f commit e79aa08

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/id3/v2/tag.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ mod tests {
13201320
assert!(tag.comment().is_none());
13211321

13221322
// Add an empty comment (which is a valid use case).
1323-
tag.set_comment("".to_owned());
1323+
tag.set_comment(String::new());
13241324
assert_eq!(Some(Cow::Borrowed("")), tag.comment());
13251325

13261326
// Insert a custom comment frame

src/ogg/opus/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl OpusFile {
3333

3434
Ok(Self {
3535
properties: if parse_options.read_properties {
36-
properties::read_properties(reader, file_information.1, &file_information.2)?
36+
properties::read_properties(reader, &file_information.1, &file_information.2)?
3737
} else {
3838
OpusProperties::default()
3939
},

src/ogg/opus/properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl OpusProperties {
6868

6969
pub(in crate::ogg) fn read_properties<R>(
7070
data: &mut R,
71-
first_page_header: PageHeader,
71+
first_page_header: &PageHeader,
7272
packets: &Packets,
7373
) -> Result<OpusProperties>
7474
where

src/ogg/speex/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl SpeexFile {
3232

3333
Ok(Self {
3434
properties: if parse_options.read_properties {
35-
properties::read_properties(reader, file_information.1, &file_information.2)?
35+
properties::read_properties(reader, &file_information.1, &file_information.2)?
3636
} else {
3737
SpeexProperties::default()
3838
},

src/ogg/speex/properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl SpeexProperties {
8686

8787
pub(in crate::ogg) fn read_properties<R>(
8888
data: &mut R,
89-
first_page_header: PageHeader,
89+
first_page_header: &PageHeader,
9090
packets: &Packets,
9191
) -> Result<SpeexProperties>
9292
where

src/ogg/vorbis/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl VorbisFile {
3434

3535
Ok(Self {
3636
properties: if parse_options.read_properties {
37-
properties::read_properties(reader, file_information.1, &file_information.2)?
37+
properties::read_properties(reader, &file_information.1, &file_information.2)?
3838
} else {
3939
VorbisProperties::default()
4040
},

src/ogg/vorbis/properties.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl VorbisProperties {
8585

8686
pub(in crate::ogg) fn read_properties<R>(
8787
data: &mut R,
88-
first_page_header: PageHeader,
88+
first_page_header: &PageHeader,
8989
packets: &Packets,
9090
) -> Result<VorbisProperties>
9191
where

0 commit comments

Comments
 (0)