From 87bb8e9473194b47c9f52e49c7fe2b632bd36aef Mon Sep 17 00:00:00 2001 From: krolxon Date: Mon, 29 Apr 2024 23:20:02 +0530 Subject: remove redundant functions and add comments --- src/connection.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/connection.rs') diff --git a/src/connection.rs b/src/connection.rs index 5cba89d..01d5d26 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -8,6 +8,7 @@ pub type Result = core::result::Result; pub type Error = Box; #[derive(Debug)] +/// struct storing the mpd Client related stuff pub struct Connection { pub conn: Client, pub songs_filenames: Vec, @@ -26,7 +27,7 @@ impl Connection { let mut conn = Client::connect(addrs).unwrap(); let empty_song = Song { - file: "No Song playing or in Queue".to_string(), + file: "No Song playing or in Queue".to_string(), ..Default::default() }; @@ -86,7 +87,7 @@ impl Connection { /// Update status pub fn update_status(&mut self) { let status = self.conn.status().unwrap(); - let empty_song = self.get_song_with_only_filename("No Song playing or in Queue"); + let empty_song = self.get_song_with_only_filename("No Song playing or in Queue"); let current_song = self .conn .currentsong() -- cgit v1.2.3