diff --git a/examples/play.rs b/examples/play.rs index 37011d02..eb7dc382 100644 --- a/examples/play.rs +++ b/examples/play.rs @@ -2,7 +2,10 @@ use std::{env, process::exit}; use librespot::{ core::{ - authentication::Credentials, config::SessionConfig, session::Session, spotify_id::{SpotifyId, SpotifyItemType}, + authentication::Credentials, + config::SessionConfig, + session::Session, + spotify_id::{SpotifyId, SpotifyItemType}, }, playback::{ audio_backend, diff --git a/src/main.rs b/src/main.rs index d5c53925..22a5fada 100644 --- a/src/main.rs +++ b/src/main.rs @@ -695,7 +695,7 @@ fn get_setup() -> Setup { // Don't log creds. trace!("\t\t{} \"XXXXXXXX\"", opt); } else { - let value = matches.opt_str(opt).unwrap_or_else(|| "".to_string()); + let value = matches.opt_str(opt).unwrap_or_default(); if value.is_empty() { trace!("\t\t{}", opt); } else { diff --git a/src/player_event_handler.rs b/src/player_event_handler.rs index 44d92eb5..d9d6de21 100644 --- a/src/player_event_handler.rs +++ b/src/player_event_handler.rs @@ -286,7 +286,7 @@ fn run_program(env_vars: HashMap<&str, String>, onevent: &str) { onevent, env_vars ); - match Command::new(&v.remove(0)) + match Command::new(v.remove(0)) .args(&v) .envs(env_vars.iter()) .spawn()