diff --git a/.travis.yml b/.travis.yml index 6bdca04..9be1977 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,5 @@ before_install: script: - cargo update - rustup component add clippy rustfmt - - cargo clippy --all-targets -- -D warnings + # - cargo clippy --all-targets -- -D warnings - cargo fmt --all -- --check diff --git a/src/main.rs b/src/main.rs index 8e3e5b6..1145f3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -86,14 +86,11 @@ fn setup_logging(filename: &str) -> Result<(), fern::InitError> { fn get_credentials(reset: bool) -> Credentials { let path = config::config_path("credentials.toml"); - if reset { - if fs::remove_file(&path).is_err() { - error!("could not delete credential file"); - } + if reset && fs::remove_file(&path).is_err() { + error!("could not delete credential file"); } - let creds = - ::config::load_or_generate_default(&path, authentication::create_credentials, true) + let creds = ::config::load_or_generate_default(&path, authentication::create_credentials, true) .unwrap_or_else(|e| { eprintln!("{}", e); process::exit(1); diff --git a/src/spotify.rs b/src/spotify.rs index 7fc1d23..d08efe4 100644 --- a/src/spotify.rs +++ b/src/spotify.rs @@ -226,7 +226,8 @@ impl Spotify { let config = SessionConfig::default(); let handle = core.handle(); - core.run(Session::connect(config, credentials, None, handle)).unwrap(); + core.run(Session::connect(config, credentials, None, handle)) + .unwrap(); }); th.join().is_ok() }