refactor: Rename chosen_method to auth_method inside fill_config_template

This commit is contained in:
Kiril Kovachev 2025-05-09 12:25:56 +01:00
parent 1400334ce0
commit 6ebd7fc11b

View File

@ -77,8 +77,8 @@ fn read_config_template() -> Result<String, std::io::Error> {
fn fill_config_template(config_template: String, args: SetupArgs) -> String { fn fill_config_template(config_template: String, args: SetupArgs) -> String {
let mut filled = formatx!(config_template, args.api_url, args.rest_url, args.username).unwrap(); let mut filled = formatx!(config_template, args.api_url, args.rest_url, args.username).unwrap();
let chosen_method: AuthMethod = args.auth_phrase.into(); let auth_method: AuthMethod = args.auth_phrase.into();
match chosen_method { match auth_method {
AuthMethod::Password(password) => { AuthMethod::Password(password) => {
filled.push_str(format!("password = \"{}\"", password).as_str()); filled.push_str(format!("password = \"{}\"", password).as_str());
}, },