From b2c7572f6644c200434982c9a89d73822f3e2a2c Mon Sep 17 00:00:00 2001 From: Avril Date: Fri, 10 Jul 2020 17:24:06 +0100 Subject: [PATCH] uhh --- src/proc.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/proc.rs b/src/proc.rs index 8f114f2..9c7b131 100644 --- a/src/proc.rs +++ b/src/proc.rs @@ -19,13 +19,15 @@ use std::{ fn handle_dupe

(path: P, mode: &config::Mode) -> Result<(), error::Error> where P: AsRef { - log!(Info, mode.logging_mode => " -> {:?}", path.as_ref()); match mode.operation_mode { config::OperationMode::Delete => { + log!(Info, mode.logging_mode => " -> {:?}", path.as_ref()); mode.error_mode.handle(std::fs::remove_file(path.as_ref()))?; }, - _ => (), + config::OperationMode::Print => { + println!(" -> {:?}", path.as_ref()); + }, } Ok(()) } @@ -36,13 +38,15 @@ where P: AsRef async fn handle_dupe_async

(path: P, mode: &config::Mode) -> Result<(), error::Error> where P: AsRef { - log!(Info, mode.logging_mode => " -> {:?}", path.as_ref()); match mode.operation_mode { config::OperationMode::Delete => { + log!(Info, mode.logging_mode => " -> {:?}", path.as_ref()); mode.error_mode.handle(tokio::fs::remove_file(path.as_ref()).await)?; }, - _ => (), + config::OperationMode::Print => { + println!(" -> {:?}", path.as_ref()); + }, } Ok(()) }