ソースを参照

Remove support for password in environment variable.

This is less useful now that saved credentials work.
Paul Lietar 9 年 前
コミット
c47a1b7ec9
1 ファイル変更0 行追加5 行削除
  1. 0 5
      src/main.rs

+ 0 - 5
src/main.rs

@@ -21,8 +21,6 @@ use librespot::session::{Bitrate, Config, Session};
 use librespot::spirc::SpircManager;
 use librespot::version;
 
-static PASSWORD_ENV_NAME: &'static str = "SPOTIFY_PASSWORD";
-
 fn usage(program: &str, opts: &getopts::Options) -> String {
     let brief = format!("Usage: {} [options]", program);
     format!("{}", opts.usage(&brief))
@@ -133,7 +131,6 @@ fn main() {
 
     let credentials = username.map(|username| {
         let password = matches.opt_str("p")
-                              .or_else(|| std::env::var(PASSWORD_ENV_NAME).ok())
                               .unwrap_or_else(|| {
                                   print!("Password: ");
                                   stdout().flush().unwrap();
@@ -158,8 +155,6 @@ fn main() {
         }
     }).expect("No username provided and no stored credentials.");
 
-    std::env::remove_var(PASSWORD_ENV_NAME);
-
     let reusable_credentials = session.login(credentials).unwrap();
     session.cache().put_credentials(&reusable_credentials);