diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-26 17:04:00 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-26 17:04:00 +0100 |
| commit | 4064639d3c3e25760ef43781feca77332cfbe5eb (patch) | |
| tree | 77ce2883e5569bd4de5e1408b41c9d6d556a11c6 /src/sources/mod.rs | |
| parent | fda55240fb06c55a7552ef7ded8c17ee56ce9f49 (diff) | |
Run lint / format
Diffstat (limited to 'src/sources/mod.rs')
| -rw-r--r-- | src/sources/mod.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/sources/mod.rs b/src/sources/mod.rs index 087a87f..47c25d0 100644 --- a/src/sources/mod.rs +++ b/src/sources/mod.rs @@ -1,4 +1,4 @@ -use std::io::{Result, Error, ErrorKind::Other}; +use std::io::{Error, ErrorKind::Other, Result}; #[cfg(target_os = "macos")] mod apple_music; @@ -29,14 +29,17 @@ pub trait LyricsSource { } pub fn list() -> Vec<String> { - available_sources().into_iter().map(|source| source.name()).collect() + available_sources() + .into_iter() + .map(|source| source.name()) + .collect() } pub fn enable(source_name: &String) -> Result<()> { let sources = available_sources(); for source in sources { if &source.name() == source_name { - return source.enable() + return source.enable(); } } Err(Error::new(Other, "No such source was available.")) @@ -46,7 +49,7 @@ pub fn disable(source_name: &String) -> Result<()> { let sources = available_sources(); for source in sources { if &source.name() == source_name { - return source.disable() + return source.disable(); } } Err(Error::new(Other, "No such source was available.")) @@ -56,7 +59,7 @@ pub fn reset(source_name: &String) -> Result<()> { let sources = available_sources(); for source in sources { if &source.name() == source_name { - return source.reset() + return source.reset(); } } Err(Error::new(Other, "No such source was available.")) @@ -69,7 +72,7 @@ pub fn get_track() -> Option<Track> { return Some(track); } } - return None + return None; } pub fn available_sources() -> Vec<Box<dyn LyricsSource>> { |