Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
Fix: Allocate stdout only when necessary
Matthias Beyer committed 4 months ago
commit 48945df40454ae5f11bf51a5c942bcbb32eb4854
parent a1060c9
1 file changed +1 -1
modified bin/main.rs
@@ -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 {