Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jihchi committed Apr 7, 2023
1 parent ebcba62 commit 1cb7537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions kq/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ fn main() -> miette::Result<()> {

let mut buffer = String::new();
let mut stdin = io::stdin();
stdin.read_to_string(&mut buffer).expect("failed to read content from stdin");
stdin
.read_to_string(&mut buffer)
.expect("failed to read content from stdin");

let doc = buffer.parse::<KdlDocument>()?;
let results = doc.query(query)?;
println!("{}", results);

if let Some(results) = results {
print!("{}", results)
}

Ok(())
}

0 comments on commit 1cb7537

Please sign in to comment.