Skip to content

Commit

Permalink
Default history size to 1 if it's set to 0
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stan <[email protected]>
  • Loading branch information
andreistan26 committed Nov 1, 2023
1 parent 973dbb5 commit 8c3787b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/history/file_backed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl FileBackedHistory {
panic!("History capacity too large to be addressed safely");
}
FileBackedHistory {
capacity,
capacity: if capacity != 0 { capacity } else { 1 },
entries: VecDeque::new(),
file: None,
len_on_disk: 0,
Expand Down

0 comments on commit 8c3787b

Please sign in to comment.