From c7b40396a2ecd338fed742df3d8da7bb79abc903 Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 18 Feb 2021 17:26:41 +0000 Subject: [PATCH] fix written message appearing when not writing --- src/main.rs | 4 ++-- src/work.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 201f76e..b28fefc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -152,10 +152,10 @@ async fn normal(cfg: config::Config) -> eyre::Result<()> #[cfg(feature="inspect")] match writer.await { - None => (), - Some(Ok(Ok(_))) => cfg_eprintln!(Verbose; cfg, "Written successfully"), + Some(Ok(Ok(_))) if cfg.serialise_output.is_some() => cfg_eprintln!(Verbose; cfg, "Written successfully"), Some(Ok(error)) => return error.wrap_err(eyre!("Failed to write graph to output stream")), Some(Err(_)) => cfg_eprintln!(Silent; cfg, "Panic while writing graph to stream"), + _ => (), } #[cfg(not(feature="inspect"))] drop(writer); diff --git a/src/work.rs b/src/work.rs index 3679196..bd2ed67 100644 --- a/src/work.rs +++ b/src/work.rs @@ -89,7 +89,7 @@ fn walk(state: State, root: PathBuf, root_ino: INode) -> BoxFuture<'static, Hash { let _guard = state.lock().enter().await; - //cfg_println!(state.config(), " -> {:?}", root); + cfg_println!(state.config(), " -> {:?}", root); //TODO: Flag to disable this? match fs::read_dir(&root).await {