fix written message appearing when not writing

arg-parsing-better
Avril 4 years ago
parent 0ca0146739
commit c7b40396a2
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -152,10 +152,10 @@ async fn normal(cfg: config::Config) -> eyre::Result<()>
#[cfg(feature="inspect")] #[cfg(feature="inspect")]
match writer.await { match writer.await {
None => (), Some(Ok(Ok(_))) if cfg.serialise_output.is_some() => cfg_eprintln!(Verbose; cfg, "Written successfully"),
Some(Ok(Ok(_))) => cfg_eprintln!(Verbose; cfg, "Written successfully"),
Some(Ok(error)) => return error.wrap_err(eyre!("Failed to write graph to output stream")), 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"), Some(Err(_)) => cfg_eprintln!(Silent; cfg, "Panic while writing graph to stream"),
_ => (),
} }
#[cfg(not(feature="inspect"))] drop(writer); #[cfg(not(feature="inspect"))] drop(writer);

@ -89,7 +89,7 @@ fn walk(state: State, root: PathBuf, root_ino: INode) -> BoxFuture<'static, Hash
{ {
let _guard = state.lock().enter().await; 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 match fs::read_dir(&root).await
{ {

Loading…
Cancel
Save