Make the compare functions async.

This commit is contained in:
Tom Alexander
2023-10-14 17:48:38 -04:00
parent c20e7b5f2f
commit 123da9cca3
4 changed files with 16 additions and 16 deletions

View File

@@ -39,14 +39,14 @@ async fn main_body() -> Result<(), Box<dyn std::error::Error>> {
let args = std::env::args().skip(1);
if args.is_empty() {
let org_contents = read_stdin_to_string()?;
if let Ok(true) = run_anonymous_compare(org_contents) {
if run_anonymous_compare(org_contents).await? {
} else {
Err("Diff results do not match.")?;
}
Ok(())
} else {
for arg in args {
if run_compare_on_file(arg)? {
if run_compare_on_file(arg).await? {
} else {
Err("Diff results do not match.")?;
}