chore: bump compiler version and clippy fixes (#105)
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
This commit is contained in:
@@ -86,7 +86,7 @@ impl TieredCompactionController {
|
|||||||
.len()
|
.len()
|
||||||
.min(self.options.max_merge_width.unwrap_or(usize::MAX));
|
.min(self.options.max_merge_width.unwrap_or(usize::MAX));
|
||||||
println!("compaction triggered by reducing sorted runs");
|
println!("compaction triggered by reducing sorted runs");
|
||||||
return Some(TieredCompactionTask {
|
Some(TieredCompactionTask {
|
||||||
tiers: snapshot
|
tiers: snapshot
|
||||||
.levels
|
.levels
|
||||||
.iter()
|
.iter()
|
||||||
@@ -94,7 +94,7 @@ impl TieredCompactionController {
|
|||||||
.cloned()
|
.cloned()
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take,
|
bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_compaction_result(
|
pub fn apply_compaction_result(
|
||||||
|
|||||||
@@ -129,7 +129,10 @@ impl<I: StorageIterator> FusedIterator<I> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
||||||
type KeyType<'a> = I::KeyType<'a> where Self: 'a;
|
type KeyType<'a>
|
||||||
|
= I::KeyType<'a>
|
||||||
|
where
|
||||||
|
Self: 'a;
|
||||||
|
|
||||||
fn is_valid(&self) -> bool {
|
fn is_valid(&self) -> bool {
|
||||||
!self.has_errored && self.iter.is_valid()
|
!self.has_errored && self.iter.is_valid()
|
||||||
|
|||||||
@@ -252,7 +252,10 @@ impl TxnIterator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl StorageIterator for 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] {
|
fn value(&self) -> &[u8] {
|
||||||
self.iter.value()
|
self.iter.value()
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ impl<I: StorageIterator> FusedIterator<I> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
||||||
type KeyType<'a> = I::KeyType<'a> where Self: 'a;
|
type KeyType<'a>
|
||||||
|
= I::KeyType<'a>
|
||||||
|
where
|
||||||
|
Self: 'a;
|
||||||
|
|
||||||
fn is_valid(&self) -> bool {
|
fn is_valid(&self) -> bool {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ impl TxnIterator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl StorageIterator for 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] {
|
fn value(&self) -> &[u8] {
|
||||||
self.iter.value()
|
self.iter.value()
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ impl TieredCompactionController {
|
|||||||
.len()
|
.len()
|
||||||
.min(self.options.max_merge_width.unwrap_or(usize::MAX));
|
.min(self.options.max_merge_width.unwrap_or(usize::MAX));
|
||||||
println!("compaction triggered by reducing sorted runs");
|
println!("compaction triggered by reducing sorted runs");
|
||||||
return Some(TieredCompactionTask {
|
Some(TieredCompactionTask {
|
||||||
tiers: snapshot
|
tiers: snapshot
|
||||||
.levels
|
.levels
|
||||||
.iter()
|
.iter()
|
||||||
@@ -94,7 +94,7 @@ impl TieredCompactionController {
|
|||||||
.cloned()
|
.cloned()
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take,
|
bottom_tier_included: snapshot.levels.len() >= num_tiers_to_take,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_compaction_result(
|
pub fn apply_compaction_result(
|
||||||
|
|||||||
@@ -99,7 +99,10 @@ impl<I: StorageIterator> FusedIterator<I> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
|
||||||
type KeyType<'a> = I::KeyType<'a> where Self: 'a;
|
type KeyType<'a>
|
||||||
|
= I::KeyType<'a>
|
||||||
|
where
|
||||||
|
Self: 'a;
|
||||||
|
|
||||||
fn is_valid(&self) -> bool {
|
fn is_valid(&self) -> bool {
|
||||||
!self.has_errored && self.iter.is_valid()
|
!self.has_errored && self.iter.is_valid()
|
||||||
|
|||||||
Reference in New Issue
Block a user