From 9a219d441660988c59a89a1d07fc237b109af960 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Fri, 9 May 2025 12:26:37 +0100 Subject: [PATCH] refactor: Factor newline character into pushed strings inside fill_config_template, instead of using a separate push call --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3f2d043..49269bb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 }