Skip to content

Commit

Permalink
fix: hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Sep 29, 2024
1 parent 599bdb9 commit 3168f38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion raft-rs
Submodule raft-rs updated 2 files
+1 −1 Cargo.toml
+5 −5 src/storage.rs
8 changes: 4 additions & 4 deletions raftify/src/storage/heed_storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl Storage for HeedStorage {
&self,
low: u64,
high: u64,
max_size: impl Into<Option<u64>>,
max_size: Option<u64>,
ctx: GetEntriesContext,
) -> raft::Result<Vec<Entry>> {
let store = self.rl();
Expand Down Expand Up @@ -709,7 +709,7 @@ mod test {

storage.replace_entries(&ents).unwrap();

let e = storage.entries(lo, hi, maxsize, GetEntriesContext::empty(false));
let e = storage.entries(lo, hi, Some(maxsize), GetEntriesContext::empty(false));
if e != wentries {
panic!("#{}: expect entries {:?}, got {:?}", i, wentries, e);
}
Expand Down Expand Up @@ -785,7 +785,7 @@ mod test {
panic!("#{}: want {}, index {}", i, windex, index);
}
let term = if let Ok(v) =
storage.entries(index, index + 1, 1, GetEntriesContext::empty(false))
storage.entries(index, index + 1, Some(1), GetEntriesContext::empty(false))
{
v.first().map_or(0, |e| e.term)
} else {
Expand All @@ -796,7 +796,7 @@ mod test {
}
let last = storage.last_index().unwrap();
let len = storage
.entries(index, last + 1, 100, GetEntriesContext::empty(false))
.entries(index, last + 1, Some(100), GetEntriesContext::empty(false))
.unwrap()
.len();
if len != wlen {
Expand Down

0 comments on commit 3168f38

Please sign in to comment.