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)
.await?
.into_iter()
.map(|item| SearchResult::from(item))
.map(SearchResult::from)
.collect();
Ok(Some(results))
}

View file

@ -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;
}

View file

@ -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,
})
}
}
}