From 4fd1723f3752e56f815f828c16ec63399e8abd8f Mon Sep 17 00:00:00 2001 From: Erica Z Date: Thu, 21 Nov 2024 22:28:45 +0100 Subject: [PATCH] into() --- src/mpris/player.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/mpris/player.rs b/src/mpris/player.rs index 25a1c7f..5fa35ca 100644 --- a/src/mpris/player.rs +++ b/src/mpris/player.rs @@ -159,25 +159,23 @@ impl Player { if let Some(song) = self.window().song() { map.insert( "mpris:trackid", - Value::new(format!("/eu/callcc/audrey/Track/{}", song.counter())).to_owned(), + format!("/eu/callcc/audrey/Track/{}", song.counter()).into(), ); map.insert( "mpris:length", - Value::new((self.window().duration() * MICROSECONDS) as i64), + ((self.window().duration() * MICROSECONDS) as i64).into(), ); map.insert( "mpris:artUrl", - Value::new( - url::Url::from_file_path(audrey::globals::art_path()) - .unwrap() - .to_string(), - ) - .to_owned(), + (url::Url::from_file_path(audrey::globals::art_path()) + .unwrap() + .to_string(),) + .into(), ); - map.insert("xesam:album", Value::new(song.album())); + map.insert("xesam:album", song.album().into()); // TODO: use the right opensubsonic data - map.insert("xesam:artist", Value::new(vec![song.artist()])); - map.insert("xesam:title", Value::new(song.title())); + map.insert("xesam:artist", vec![song.artist()].into()); + map.insert("xesam:title", song.title().into()); } map