chore: please clippy
parent
5ae23c931a
commit
ce3dcdd4b1
|
@ -199,22 +199,22 @@ impl fmt::Display for ServerCommand {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
let cmd = self.create_cmd();
|
let cmd = self.create_cmd();
|
||||||
|
|
||||||
write!(f, "Command: {}\n", self.java)?;
|
writeln!(f, "Command: {}", self.java)?;
|
||||||
write!(f, "Working dir: {}\n", self.config_dir.as_path().display())?;
|
writeln!(f, "Working dir: {}", self.config_dir.as_path().display())?;
|
||||||
|
|
||||||
// Print command env vars
|
// Print command env vars
|
||||||
write!(f, "Environment:\n")?;
|
writeln!(f, "Environment:")?;
|
||||||
|
|
||||||
for (key, val) in cmd.get_envs().filter(|(_, v)| v.is_some()) {
|
for (key, val) in cmd.get_envs().filter(|(_, v)| v.is_some()) {
|
||||||
let val = val.unwrap();
|
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
|
// Print command arguments
|
||||||
write!(f, "Arguments:\n")?;
|
writeln!(f, "Arguments:")?;
|
||||||
|
|
||||||
for arg in cmd.get_args() {
|
for arg in cmd.get_args() {
|
||||||
write!(f, " {}\n", arg.to_string_lossy())?;
|
writeln!(f, " {}", arg.to_string_lossy())?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue