diff --git a/mini-lsm-mvcc/src/compact/tiered.rs b/mini-lsm-mvcc/src/compact/tiered.rs index d268ec28..5e9bac2f 100644 --- a/mini-lsm-mvcc/src/compact/tiered.rs +++ b/mini-lsm-mvcc/src/compact/tiered.rs @@ -86,7 +86,7 @@ impl TieredCompactionController { .len() .min(self.options.max_merge_width.unwrap_or(usize::MAX)); println!("compaction triggered by reducing sorted runs"); - return Some(TieredCompactionTask { + Some(TieredCompactionTask { tiers: snapshot .levels .iter() @@ -94,7 +94,7 @@ impl TieredCompactionController { .cloned() .collect::>(), bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take, - }); + }) } pub fn apply_compaction_result( diff --git a/mini-lsm-mvcc/src/lsm_iterator.rs b/mini-lsm-mvcc/src/lsm_iterator.rs index 36a87bfb..79c7c7cb 100644 --- a/mini-lsm-mvcc/src/lsm_iterator.rs +++ b/mini-lsm-mvcc/src/lsm_iterator.rs @@ -129,7 +129,10 @@ impl FusedIterator { } impl StorageIterator for FusedIterator { - type KeyType<'a> = I::KeyType<'a> where Self: 'a; + type KeyType<'a> + = I::KeyType<'a> + where + Self: 'a; fn is_valid(&self) -> bool { !self.has_errored && self.iter.is_valid() diff --git a/mini-lsm-mvcc/src/mvcc/txn.rs b/mini-lsm-mvcc/src/mvcc/txn.rs index 49b28d98..9595bd67 100644 --- a/mini-lsm-mvcc/src/mvcc/txn.rs +++ b/mini-lsm-mvcc/src/mvcc/txn.rs @@ -252,7 +252,10 @@ impl TxnIterator { } impl StorageIterator for TxnIterator { - type KeyType<'a> = &'a [u8] where Self: 'a; + type KeyType<'a> + = &'a [u8] + where + Self: 'a; fn value(&self) -> &[u8] { self.iter.value() diff --git a/mini-lsm-starter/src/lsm_iterator.rs b/mini-lsm-starter/src/lsm_iterator.rs index 909f2cb9..8ab5652c 100644 --- a/mini-lsm-starter/src/lsm_iterator.rs +++ b/mini-lsm-starter/src/lsm_iterator.rs @@ -59,7 +59,10 @@ impl FusedIterator { } impl StorageIterator for FusedIterator { - type KeyType<'a> = I::KeyType<'a> where Self: 'a; + type KeyType<'a> + = I::KeyType<'a> + where + Self: 'a; fn is_valid(&self) -> bool { unimplemented!() diff --git a/mini-lsm-starter/src/mvcc/txn.rs b/mini-lsm-starter/src/mvcc/txn.rs index 9d6fba95..a598de46 100644 --- a/mini-lsm-starter/src/mvcc/txn.rs +++ b/mini-lsm-starter/src/mvcc/txn.rs @@ -104,7 +104,10 @@ impl TxnIterator { } impl StorageIterator for TxnIterator { - type KeyType<'a> = &'a [u8] where Self: 'a; + type KeyType<'a> + = &'a [u8] + where + Self: 'a; fn value(&self) -> &[u8] { self.iter.value() diff --git a/mini-lsm/src/compact/tiered.rs b/mini-lsm/src/compact/tiered.rs index d268ec28..5e9bac2f 100644 --- a/mini-lsm/src/compact/tiered.rs +++ b/mini-lsm/src/compact/tiered.rs @@ -86,7 +86,7 @@ impl TieredCompactionController { .len() .min(self.options.max_merge_width.unwrap_or(usize::MAX)); println!("compaction triggered by reducing sorted runs"); - return Some(TieredCompactionTask { + Some(TieredCompactionTask { tiers: snapshot .levels .iter() @@ -94,7 +94,7 @@ impl TieredCompactionController { .cloned() .collect::>(), bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take, - }); + }) } pub fn apply_compaction_result( diff --git a/mini-lsm/src/lsm_iterator.rs b/mini-lsm/src/lsm_iterator.rs index 448989d4..0722fd78 100644 --- a/mini-lsm/src/lsm_iterator.rs +++ b/mini-lsm/src/lsm_iterator.rs @@ -99,7 +99,10 @@ impl FusedIterator { } impl StorageIterator for FusedIterator { - type KeyType<'a> = I::KeyType<'a> where Self: 'a; + type KeyType<'a> + = I::KeyType<'a> + where + Self: 'a; fn is_valid(&self) -> bool { !self.has_errored && self.iter.is_valid()