This commit is contained in:
Serial 2021-12-05 18:11:13 -05:00
parent 45fd0c7ed9
commit 175ff1de0b
6 changed files with 13 additions and 13 deletions

View file

@ -112,9 +112,9 @@ impl From<ApeFile> for TaggedFile {
ty: FileType::APE,
properties: FileProperties::from(input.properties),
tags: vec![
input.ape_tag.map(|at| at.into()),
input.id3v1_tag.map(|id3v1| id3v1.into()),
input.id3v2_tag.map(|id3v2| id3v2.into()),
input.ape_tag.map(Into::into),
input.id3v1_tag.map(Into::into),
input.id3v2_tag.map(Into::into),
]
.into_iter()
.flatten()

View file

@ -146,7 +146,7 @@ impl<'a> Into<ApeTagRef<'a>> for &'a ApeTag {
fn into(self) -> ApeTagRef<'a> {
ApeTagRef {
read_only: self.read_only,
items: Box::new(self.items.iter().map(|i| i.into())),
items: Box::new(self.items.iter().map(Into::into)),
}
}
}

View file

@ -32,8 +32,8 @@ impl From<AiffFile> for TaggedFile {
ty: FileType::AIFF,
properties: input.properties,
tags: vec![
input.text_chunks.map(|tc| tc.into()),
input.id3v2_tag.map(|id3| id3.into()),
input.text_chunks.map(Into::into),
input.id3v2_tag.map(Into::into),
]
.into_iter()
.flatten()

View file

@ -33,8 +33,8 @@ impl From<WavFile> for TaggedFile {
ty: FileType::WAV,
properties: FileProperties::from(input.properties),
tags: vec![
input.riff_info.map(|ri| ri.into()),
input.id3v2_tag.map(|id3| id3.into()),
input.riff_info.map(Into::into),
input.id3v2_tag.map(Into::into),
]
.into_iter()
.flatten()

View file

@ -125,9 +125,9 @@ impl From<Mp3File> for TaggedFile {
ty: FileType::MP3,
properties: FileProperties::from(input.properties),
tags: vec![
input.id3v2_tag.map(|id3v2| id3v2.into()),
input.id3v1_tag.map(|id3v1| id3v1.into()),
input.ape_tag.map(|at| at.into()),
input.id3v2_tag.map(Into::into),
input.id3v1_tag.map(Into::into),
input.ape_tag.map(Into::into),
]
.into_iter()
.flatten()

View file

@ -93,7 +93,7 @@ impl From<Tag> for Ilst {
let mut ilst = Self::default();
for item in input.items {
if let Some(ident) = item_key_to_ident(item.key()).map(|k| k.into()) {
if let Some(ident) = item_key_to_ident(item.key()).map(Into::into) {
let data = match item.item_value {
ItemValue::Text(text) => AtomData::UTF8(text),
_ => continue,
@ -286,7 +286,7 @@ impl<'a> Into<AtomDataRef<'a>> for &'a AtomData {
impl<'a> Into<IlstRef<'a>> for &'a Ilst {
fn into(self) -> IlstRef<'a> {
IlstRef {
atoms: Box::new(self.atoms.iter().map(|a| a.into())),
atoms: Box::new(self.atoms.iter().map(Into::into)),
}
}
}