From ce3dcdd4b1e49d64938e9154457cc8a8f96845e7 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Tue, 13 Jun 2023 13:01:47 +0200 Subject: [PATCH] chore: please clippy --- src/server/command.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/command.rs b/src/server/command.rs index e725a38..641c6b8 100644 --- a/src/server/command.rs +++ b/src/server/command.rs @@ -199,22 +199,22 @@ impl fmt::Display for ServerCommand { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let cmd = self.create_cmd(); - write!(f, "Command: {}\n", self.java)?; - write!(f, "Working dir: {}\n", self.config_dir.as_path().display())?; + writeln!(f, "Command: {}", self.java)?; + writeln!(f, "Working dir: {}", self.config_dir.as_path().display())?; // Print command env vars - write!(f, "Environment:\n")?; + writeln!(f, "Environment:")?; for (key, val) in cmd.get_envs().filter(|(_, v)| v.is_some()) { let val = val.unwrap(); - write!(f, " {}={}\n", key.to_string_lossy(), val.to_string_lossy())?; + writeln!(f, " {}={}", key.to_string_lossy(), val.to_string_lossy())?; } // Print command arguments - write!(f, "Arguments:\n")?; + writeln!(f, "Arguments:")?; for arg in cmd.get_args() { - write!(f, " {}\n", arg.to_string_lossy())?; + writeln!(f, " {}", arg.to_string_lossy())?; } Ok(())