mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-21 02:20:48 +08:00
Fix: Allocate stdout only when necessary
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
committed by
Erik Kundt
parent
a1060c9801
commit
48945df404
+1
-1
@@ -174,8 +174,8 @@ fn print_help() -> anyhow::Result<()> {
|
||||
fn run(command: Command) -> Result<(), Error> {
|
||||
match command {
|
||||
Command::Version { json } => {
|
||||
let mut stdout = io::stdout();
|
||||
if json {
|
||||
let mut stdout = io::stdout();
|
||||
VERSION.write_json(&mut stdout)?;
|
||||
println!();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user