diff --git a/src/downloader.rs b/src/downloader.rs index ad744e6..4aa25ba 100644 --- a/src/downloader.rs +++ b/src/downloader.rs @@ -74,7 +74,7 @@ impl Downloader { .search(input) .await? .into_iter() - .map(|item| SearchResult::from(item)) + .map(SearchResult::from) .collect(); Ok(Some(results)) } diff --git a/src/main.rs b/src/main.rs index 032ec9d..a9204ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,11 +30,7 @@ async fn main() { use colored::control; //backwards compatibility. - match control::set_virtual_terminal(true) { - Ok(_) => {} - Err(_) => {} - }; - + if control::set_virtual_terminal(true).is_ok() {}; start().await; } diff --git a/src/tag/mod.rs b/src/tag/mod.rs index 3040d89..2583265 100644 --- a/src/tag/mod.rs +++ b/src/tag/mod.rs @@ -28,11 +28,11 @@ impl TagWrap { } /// Get Tag trait - pub fn get_tag(&mut self) -> Box<&mut dyn Tag> { - Box::new(match self { + pub fn get_tag(&mut self) -> &mut dyn Tag { + match self { TagWrap::Ogg(tag) => tag, TagWrap::Id3(tag) => tag, - }) + } } }