From 4064639d3c3e25760ef43781feca77332cfbe5eb Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 26 Jan 2025 17:04:00 +0100 Subject: Run lint / format --- src/sources/dbus.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/sources/dbus.rs') diff --git a/src/sources/dbus.rs b/src/sources/dbus.rs index 57c5853..2f6bccd 100644 --- a/src/sources/dbus.rs +++ b/src/sources/dbus.rs @@ -1,5 +1,5 @@ -use std::io::Result; use mpris::PlayerFinder; +use std::io::Result; use crate::Track; @@ -14,24 +14,19 @@ impl Dbus { } impl LyricsSource for Dbus { - fn name(&self) -> String { "dbus".to_string() } fn current_track(&self) -> Option { - let player = PlayerFinder::new().ok()? - .find_active().ok()?; + let player = PlayerFinder::new().ok()?.find_active().ok()?; let metadata = player.get_metadata().ok()?; let name = metadata.title()?.to_string(); let artists = metadata.artists()?; let artist = artists.get(0)?.to_string(); - Some(Track { - name, - artist - }) + Some(Track { name, artist }) } fn disable(&self) -> Result<()> { -- cgit