From 583b5fd0e66a453a9f754b666c171749312affce Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 5 Nov 2020 13:09:31 +0000 Subject: [PATCH] debug_assert --- src/delete.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/delete.rs b/src/delete.rs index 4906a4e..24ac094 100644 --- a/src/delete.rs +++ b/src/delete.rs @@ -28,15 +28,11 @@ use futures::{ async fn process_single(state: Arc, path: impl AsRef) -> eyre::Result<()> { let path = path.as_ref(); - #[cfg(debug_assertions)] { - if !path.is_file() { - panic!("process_single() expected a file, but {:?} is not one.", path); - } - } + debug_assert!(!path.is_file(), "process_single() expected a file, but {:?} is not one.", path); let _g = state.lock().await; debug!("{:?} Processing", path); - //TODO: Actual processing + Ok(()) }