Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
update toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Jan 19, 2024
1 parent b60c110 commit 976437f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly
nightly-2024-01-18
2 changes: 1 addition & 1 deletion src/kernel/lsm/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ mod tests {
.read(true)
.open(file_path.clone())?;

let data = vec![
let data = [
"abcdefghi".as_bytes().to_vec(), // fits one block of 17
"123456789012".as_bytes().to_vec(), // spans two blocks of 17
"0101010101010101010101".as_bytes().to_vec(),
Expand Down
34 changes: 18 additions & 16 deletions src/kernel/lsm/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,24 +368,26 @@ impl MemTable {
while let (Some(mem_item), Some(immut_mem_item)) =
(mem_current.take(), immut_mem_current.take())
{
if mem_item.0 < immut_mem_item.0 {
merged.push(mem_item);
immut_mem_current = Some(immut_mem_item);

mem_current = mem_iter.next();
if mem_current.is_none() {
break;
match mem_item.0.cmp(&immut_mem_item.0) {
Ordering::Less => {
merged.push(mem_item);
immut_mem_current = Some(immut_mem_item);

mem_current = mem_iter.next();
if mem_current.is_none() {
break;
}
}
} else if mem_item.0 > immut_mem_item.0 {
merged.push(immut_mem_item);
mem_current = Some(mem_item);

immut_mem_current = immut_mem_iter.next();
if immut_mem_current.is_none() {
break;
Ordering::Greater => {
merged.push(immut_mem_item);
mem_current = Some(mem_item);

immut_mem_current = immut_mem_iter.next();
if immut_mem_current.is_none() {
break;
}
}
} else {
merged.push(mem_item);
Ordering::Equal => merged.push(mem_item),
}
}

Expand Down
1 change: 1 addition & 0 deletions src/kernel/utils/lru_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl<K: Hash, V> Hash for KeyRef<K, V> {
impl<K: Eq, V> Eq for KeyRef<K, V> {}

impl<K: Eq, V> PartialEq<Self> for KeyRef<K, V> {
#[allow(clippy::unconditional_recursion)]
fn eq(&self, other: &Self) -> bool {
unsafe { self.0.as_ref().key.eq(&other.0.as_ref().key) }
}
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![feature(fs_try_exists)]
#![feature(cursor_remaining)]
#![feature(slice_pattern)]
#![feature(bound_map)]
#![feature(is_sorted)]

extern crate core;
Expand Down

0 comments on commit 976437f

Please sign in to comment.