aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-06-27 20:36:56 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-06-27 20:36:56 +0200
commit019ed133569825531b456bd594d85afe6854a232 (patch)
treec87d6bf74b57bdacea1ed4de8619eb02bfa87146 /src/main.rs
parent72115f805982c7322a0355f4974e0108a3905123 (diff)
Apply clippy
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 7b61a85..4a3c05f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,7 +3,7 @@ mod lyrics_engine;
mod sources;
use clap::Parser;
-use std::io::{Error, ErrorKind::Other, Result};
+use std::io::{Error, Result};
use configuration::Configuration;
use lyrics_engine::print_lyrics;
@@ -53,7 +53,7 @@ async fn main() -> Result<()> {
match result {
Ok(_) => Ok(()),
Err(e) => {
- eprintln!("Error: {}", e);
+ eprintln!("Error: {e}");
std::process::exit(1);
}
}
@@ -67,7 +67,7 @@ async fn run() -> Result<()> {
if arguments.list_sources {
let sources = list();
for source in sources {
- print!("{}", source);
+ print!("{source}");
if configuration.is_enabled(&source) {
print!(" (enabled)");
}
@@ -102,7 +102,7 @@ async fn run() -> Result<()> {
};
} else {
current_track =
- get_track().ok_or_else(|| Error::new(Other, "No Artist/Song could be found :("))?
+ get_track().ok_or_else(|| Error::other("No Artist/Song could be found :("))?
}
print_lyrics(current_track, arguments.show_title).await