debug_assert

progress
Avril 4 years ago
parent b6dc149413
commit 583b5fd0e6
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -28,15 +28,11 @@ use futures::{
async fn process_single(state: Arc<state::State>, path: impl AsRef<Path>) -> eyre::Result<()> async fn process_single(state: Arc<state::State>, path: impl AsRef<Path>) -> eyre::Result<()>
{ {
let path = path.as_ref(); let path = path.as_ref();
#[cfg(debug_assertions)] { debug_assert!(!path.is_file(), "process_single() expected a file, but {:?} is not one.", path);
if !path.is_file() {
panic!("process_single() expected a file, but {:?} is not one.", path);
}
}
let _g = state.lock().await; let _g = state.lock().await;
debug!("{:?} Processing", path); debug!("{:?} Processing", path);
//TODO: Actual processing
Ok(()) Ok(())
} }

Loading…
Cancel
Save