Merge pull request #1076 from kingosticks/fix-latest-clippy

Fix latest clippy warnings
This commit is contained in:
Roderick van Domburg 2022-11-24 12:43:15 +01:00 committed by GitHub
commit b0db6502b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

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

View file

@ -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 {

View file

@ -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()