Skip to content

Commit

Permalink
Fixed incorrect option handling for conversion of ID3v2Tag to AnyTag (#…
Browse files Browse the repository at this point in the history
…37)

* Fixed erroneous handling of None value

* Changed fix to idiomatic Rust
  • Loading branch information
aybruh00 authored Nov 21, 2023
1 parent 58340b7 commit 46c7dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/id3_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl<'a> From<&'a Id3v2Tag> for AnyTag<'a> {
title: inp.title(),
artists: inp.artists(),
year: inp.year(),
duration: Some(inp.inner.duration().unwrap() as f64),
duration: inp.inner.duration().map(f64::from),
album_title: inp.album_title(),
album_artists: inp.album_artists(),
album_cover: inp.album_cover(),
Expand Down

0 comments on commit 46c7dcf

Please sign in to comment.