git.delta.rocks / jrsonnet / refs/commits / a90b3d609f9a

difftreelog

fix drop empty line on empty output

Yaroslav Bolyukin2021-01-12parent: #5ffc4ed.patch.diff
in: master

1 file changed

modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
136 let mut file = File::create(path)?;136 let mut file = File::create(path)?;
137 writeln!(file, "{}", state.manifest(val)?)?;137 writeln!(file, "{}", state.manifest(val)?)?;
138 } else {138 } else {
139 println!("{}", state.manifest(val)?);139 let output = state.manifest(val)?;
140 if !output.is_empty() {
141 println!("{}", output);
142 }
140 }143 }
141144
142 Ok(())145 Ok(())