From e7547d2207bea76e811145d70933999206d84754 Mon Sep 17 00:00:00 2001 From: Jay Chia Date: Mon, 2 Oct 2023 11:23:12 -0700 Subject: [PATCH] nit: flatten a match statement --- src/daft-io/src/object_io.rs | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/daft-io/src/object_io.rs b/src/daft-io/src/object_io.rs index e760206ab2..f39677380f 100644 --- a/src/daft-io/src/object_io.rs +++ b/src/daft-io/src/object_io.rs @@ -428,29 +428,29 @@ pub(crate) async fn glob( while let Some(val) = results.next().await { match val { Ok(fm) => match fm.filetype { - FileType::Directory => { + FileType::Directory if partial_glob_matcher - .is_match(fm.filepath.as_str().trim_end_matches('/')) - { - visit( - result_tx.clone(), - source.clone(), - state - .clone() - .advance( - fm.filepath, - state.current_fragment_idx + 1, - stream_dir_count, - ) - .with_wildcard_mode(), - ); - } + .is_match(fm.filepath.as_str().trim_end_matches('/')) => + { + visit( + result_tx.clone(), + source.clone(), + state + .clone() + .advance( + fm.filepath, + state.current_fragment_idx + 1, + stream_dir_count, + ) + .with_wildcard_mode(), + ); } - FileType::File => { - if state.full_glob_matcher.is_match(fm.filepath.as_str()) { - result_tx.send(Ok(fm)).await.expect("Internal multithreading channel is broken: results may be incorrect"); - } + FileType::File + if state.full_glob_matcher.is_match(fm.filepath.as_str()) => + { + result_tx.send(Ok(fm)).await.expect("Internal multithreading channel is broken: results may be incorrect"); } + _ => (), }, // Always silence NotFound since we are in wildcard "search" mode here by definition Err(super::Error::NotFound { .. }) => (),