diff options
| author | Teddy Wing | 2022-03-19 20:51:55 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2022-03-19 21:05:21 +0100 | 
| commit | d5c62cac01103881b8c8f8d629bc2eb0d12723c7 (patch) | |
| tree | f0e09be343ab87aeefad3e963f801ec7696e2a17 /src | |
| parent | 78358c6f9e084b27a5fc513095a972c6b0e3361a (diff) | |
| download | yaqlite-d5c62cac01103881b8c8f8d629bc2eb0d12723c7.tar.bz2 | |
main: Write a newline after YAML output
It turns out the `YamlEmitter` doesn't output a newline at the end.
Output a final newline as this is a command line program.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/main.rs b/src/main.rs index 2ac689c..8b4cb5b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,6 +100,12 @@ fn main() {              let mut emitter = yaml_rust::YamlEmitter::new(&mut buffer);              emitter.dump(&yaml_data).unwrap(); +            // YamlEmitter doesn't output a trailing newline. +            { +                use std::io::Write; +                writeln!(stdout_handle, "").unwrap(); +            } +              dbconn.close().unwrap();          },      }; | 
