From 861a986567310dfe9ccd85d2976b0ebfb683c818 Mon Sep 17 00:00:00 2001 From: AdaShoelace Date: Thu, 21 Jan 2021 22:24:15 +0100 Subject: Change to serde Change config serializer to serde in order to get cleaner config types. --- src/utils/spotify.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils/spotify.rs') diff --git a/src/utils/spotify.rs b/src/utils/spotify.rs index 4954f3b..a73128d 100644 --- a/src/utils/spotify.rs +++ b/src/utils/spotify.rs @@ -1,11 +1,11 @@ -use crate::types::Config; +use crate::config::CONFIG; use dbus::blocking::stdintf::org_freedesktop_dbus::Properties; use dbus::{arg, blocking::Connection}; use std::time::Duration; // getting spotify current artist and title. // FIXME: I know im lazy asshole, this error handling looks ugly, i dont like it too, need to fix soon. -pub fn get_spotify(config: &Config) -> String { +pub fn get_spotify() -> String { let conn = match Connection::new_session() { Ok(conn) => conn, _ => return String::from(""), @@ -40,6 +40,6 @@ pub fn get_spotify(config: &Config) -> String { format!( " {} {} - {} {}", - config.spotify.icon, artist, title, config.seperator + CONFIG.spotify.icon, artist, title, CONFIG.seperator ) } -- cgit v1.2.3