mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 14:12:31 +00:00
Fix spacing again
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
This commit is contained in:
parent
845456b9c7
commit
2372f93303
1 changed files with 33 additions and 33 deletions
|
@ -24,41 +24,41 @@ pub fn impl_tag(args: TokenStream, input: TokenStream) -> TokenStream {
|
|||
let input_ident = input.ident;
|
||||
|
||||
let mut anytag_convert = quote! {
|
||||
impl<'a> From<AnyTag<'a>> for #input_ident {
|
||||
fn from(inp: AnyTag<'a>) -> Self {
|
||||
let mut tag = #input_ident::default();
|
||||
impl<'a> From<AnyTag<'a>> for #input_ident {
|
||||
fn from(inp: AnyTag<'a>) -> Self {
|
||||
let mut tag = #input_ident::default();
|
||||
|
||||
if let Some(v) = inp.title() {
|
||||
tag.set_title(v)
|
||||
}
|
||||
if let Some(v) = inp.artists_as_string() {
|
||||
tag.set_artist(&v)
|
||||
}
|
||||
if let Some(v) = inp.year {
|
||||
tag.set_year(v)
|
||||
}
|
||||
if let Some(v) = inp.album().title {
|
||||
tag.set_album_title(v)
|
||||
}
|
||||
if let Some(v) = inp.album().artists {
|
||||
tag.set_album_artist(&v.join("/"))
|
||||
}
|
||||
if let Some(v) = inp.track_number() {
|
||||
tag.set_track_number(v)
|
||||
}
|
||||
if let Some(v) = inp.total_tracks() {
|
||||
tag.set_total_tracks(v)
|
||||
}
|
||||
if let Some(v) = inp.disc_number() {
|
||||
tag.set_disc_number(v)
|
||||
}
|
||||
if let Some(v) = inp.total_discs() {
|
||||
tag.set_total_discs(v)
|
||||
}
|
||||
|
||||
tag
|
||||
}
|
||||
if let Some(v) = inp.title() {
|
||||
tag.set_title(v)
|
||||
}
|
||||
if let Some(v) = inp.artists_as_string() {
|
||||
tag.set_artist(&v)
|
||||
}
|
||||
if let Some(v) = inp.year {
|
||||
tag.set_year(v)
|
||||
}
|
||||
if let Some(v) = inp.album().title {
|
||||
tag.set_album_title(v)
|
||||
}
|
||||
if let Some(v) = inp.album().artists {
|
||||
tag.set_album_artist(&v.join("/"))
|
||||
}
|
||||
if let Some(v) = inp.track_number() {
|
||||
tag.set_track_number(v)
|
||||
}
|
||||
if let Some(v) = inp.total_tracks() {
|
||||
tag.set_total_tracks(v)
|
||||
}
|
||||
if let Some(v) = inp.disc_number() {
|
||||
tag.set_disc_number(v)
|
||||
}
|
||||
if let Some(v) = inp.total_discs() {
|
||||
tag.set_total_discs(v)
|
||||
}
|
||||
|
||||
tag
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(attr) = input.attrs.first() {
|
||||
|
|
Loading…
Reference in a new issue