diff --git a/src/settings/config.rs b/src/settings/config.rs index 557dd6e..e6fcdd8 100644 --- a/src/settings/config.rs +++ b/src/settings/config.rs @@ -121,7 +121,7 @@ pub fn get_or_prompt_api_key() -> Result> { Ok(api_key) } -pub fn change_and_prompt_api_key() -> Result> { +pub fn change_and_prompt_api_key() -> Result<(), Box> { println!(); println!("{}", "🔑 NoEntropy Configuration".bold().cyan()); println!("{}", "─────────────────────────────".cyan()); @@ -129,11 +129,11 @@ pub fn change_and_prompt_api_key() -> Result> let api_key = Prompter::prompt_api_key()?; let mut config = Config::load().unwrap_or_default(); - config.api_key = api_key.clone(); + config.api_key = api_key; config.save()?; println!(); - Ok(api_key) + Ok(()) } pub fn get_or_prompt_download_folder() -> Result> {