From 6341eb087cea80b65740c95ff376a7397fb212f3 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 18 Nov 2023 17:43:56 +0100 Subject: [PATCH] Remove unnecessary trim_end_matches('\n') The logging code already does trim_end_matches('\n') so we do not have to the that in the caller, too. Signed-off-by: Uli Schlachter --- src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 41436f6..14d34f0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -677,10 +677,7 @@ fn configure_terminal(consdev: &str) { .stderr(Stdio::inherit()) // Replace the current init process with a shell session. .output(); - log!( - "{}", - String::from_utf8_lossy(&output.unwrap().stderr).trim_end_matches('\n') - ); + log!("{}", String::from_utf8_lossy(&output.unwrap().stderr)); } }