diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-04-29 23:20:02 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-04-29 23:20:02 +0530 |
| commit | 87bb8e9473194b47c9f52e49c7fe2b632bd36aef (patch) | |
| tree | 93c29be7780a6f3677409ad4b1f349ae591dc8d0 /src/connection.rs | |
| parent | c047f63cd1c727c36c61acacba073eb03b7f8617 (diff) | |
remove redundant functions and add comments
Diffstat (limited to 'src/connection.rs')
| -rwxr-xr-x | src/connection.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<T> = core::result::Result<T, Error>; pub type Error = Box<dyn std::error::Error>; #[derive(Debug)] +/// struct storing the mpd Client related stuff pub struct Connection { pub conn: Client, pub songs_filenames: Vec<String>, @@ -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() |
