From b94fa05e6c03ce3406c835b408c9d0325b47f4fa Mon Sep 17 00:00:00 2001 From: Little-Wallace Date: Sun, 29 Jan 2023 12:56:09 +0800 Subject: [PATCH] fix warn Signed-off-by: Little-Wallace --- src/storage/src/hummock/utils.rs | 21 ++++++--------------- src/storage/src/lib.rs | 1 - 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/storage/src/hummock/utils.rs b/src/storage/src/hummock/utils.rs index 5c71678baa48b..1e0571736ca7b 100644 --- a/src/storage/src/hummock/utils.rs +++ b/src/storage/src/hummock/utils.rs @@ -73,24 +73,15 @@ pub fn validate_table_key_range(version: &LocalHummockVersion) { .unwrap() .sub_levels .iter() - .for_each(|level| { - for t in &level.table_infos { - assert!( - t.key_range.is_some(), - "key_range in table [{}] is none", - t.id - ); - } - }); - group.raw_group_meta.levels.iter().for_each(|level| { - for t in &level.table_infos { + .chain(group.raw_group_meta.levels.iter()) + .flat_map(|level| level.table_infos.iter()) + .for_each(|sst| { assert!( - t.key_range.is_some(), + sst.key_range.is_some(), "key_range in table [{}] is none", - t.id + sst.id ); - } - }); + }); }); } diff --git a/src/storage/src/lib.rs b/src/storage/src/lib.rs index 12e65ea74f8ba..014ab72abdf99 100644 --- a/src/storage/src/lib.rs +++ b/src/storage/src/lib.rs @@ -42,7 +42,6 @@ #![feature(provide_any)] #![feature(let_chains)] #![feature(associated_type_bounds)] -#![feature(map_many_mut)] pub mod hummock; pub mod memory;