refactor: Factor newline character into pushed strings inside fill_config_template, instead of using a separate push call

This commit is contained in:
Kiril Kovachev 2025-05-09 12:26:37 +01:00
parent 6ebd7fc11b
commit 9a219d4416

View File

@ -80,13 +80,12 @@ fn fill_config_template(config_template: String, args: SetupArgs) -> String {
let auth_method: AuthMethod = args.auth_phrase.into(); let auth_method: AuthMethod = args.auth_phrase.into();
match auth_method { match auth_method {
AuthMethod::Password(password) => { AuthMethod::Password(password) => {
filled.push_str(format!("password = \"{}\"", password).as_str()); filled.push_str(format!("password = \"{}\"\n", password).as_str());
}, },
AuthMethod::OAuth2Token(oauth2_token) => { AuthMethod::OAuth2Token(oauth2_token) => {
filled.push_str(format!("oauth2_token = \"{}\"", oauth2_token).as_str()); filled.push_str(format!("oauth2_token = \"{}\"\n", oauth2_token).as_str());
} }
} }
filled.push('\n');
filled filled
} }