Lint code

This commit is contained in:
oSumAtrIX 2021-11-07 03:27:11 +01:00
parent c523a3a18c
commit 2d00d596a0
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
3 changed files with 5 additions and 9 deletions

View file

@ -74,7 +74,7 @@ impl Downloader {
.search(input) .search(input)
.await? .await?
.into_iter() .into_iter()
.map(|item| SearchResult::from(item)) .map(SearchResult::from)
.collect(); .collect();
Ok(Some(results)) Ok(Some(results))
} }

View file

@ -30,11 +30,7 @@ async fn main() {
use colored::control; use colored::control;
//backwards compatibility. //backwards compatibility.
match control::set_virtual_terminal(true) { if control::set_virtual_terminal(true).is_ok() {};
Ok(_) => {}
Err(_) => {}
};
start().await; start().await;
} }

View file

@ -28,11 +28,11 @@ impl TagWrap {
} }
/// Get Tag trait /// Get Tag trait
pub fn get_tag(&mut self) -> Box<&mut dyn Tag> { pub fn get_tag(&mut self) -> &mut dyn Tag {
Box::new(match self { match self {
TagWrap::Ogg(tag) => tag, TagWrap::Ogg(tag) => tag,
TagWrap::Id3(tag) => tag, TagWrap::Id3(tag) => tag,
}) }
} }
} }