refactor: Factor newline character into pushed strings inside fill_config_template, instead of using a separate push call
This commit is contained in:
parent
6ebd7fc11b
commit
9a219d4416
@ -80,13 +80,12 @@ fn fill_config_template(config_template: String, args: SetupArgs) -> String {
|
||||
let auth_method: AuthMethod = args.auth_phrase.into();
|
||||
match auth_method {
|
||||
AuthMethod::Password(password) => {
|
||||
filled.push_str(format!("password = \"{}\"", password).as_str());
|
||||
filled.push_str(format!("password = \"{}\"\n", password).as_str());
|
||||
},
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user