From 083ba1daf4b7ed53a5a3370276d8caf45b0a30ab Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Thu, 2 Dec 2021 19:34:47 +0000 Subject: [PATCH] refactor: apply PR feedback --- read_buffer/src/chunk.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/read_buffer/src/chunk.rs b/read_buffer/src/chunk.rs index 9cdf8b6f8b..9f6c9513b9 100644 --- a/read_buffer/src/chunk.rs +++ b/read_buffer/src/chunk.rs @@ -192,10 +192,10 @@ impl Chunk { .read_filter(&select_columns, &predicate, negated_predicates.as_slice()) .context(TableError); - let row_groups = match &result { - Ok(result) => result.row_groups(), - Err(_) => 0, - }; + let row_groups = result + .as_ref() + .map(|result| result.row_groups()) + .unwrap_or(0); debug!(elapsed=?now.elapsed(), succeeded=result.is_ok(), ?row_groups, "read_filter completed"); result }