Skip to content

Commit

Permalink
fix: add cfg(test) in certain methods to increase coverage rate
Browse files Browse the repository at this point in the history
Signed-off-by: GFX9 <[email protected]>
  • Loading branch information
GFX9 committed Apr 19, 2024
1 parent 4bb368a commit 26eef68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/curp/src/server/raw_curp/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl<C: Command> LogEntryVecDeque<C> {
}
}

#[allow(unused)]
#[cfg(test)]
/// set batch limit and reconstruct `batch_index`
fn set_batch_limit(&mut self, batch_limit: u64) {
#![allow(clippy::indexing_slicing)]
Expand Down Expand Up @@ -553,7 +553,7 @@ impl<C: Command> Log<C> {
});
}

#[allow(unused)]
#[cfg(test)]
/// set batch limit and reconstruct `batch_index`
pub(super) fn set_batch_limit(&mut self, batch_limit: u64) {
self.entries.set_batch_limit(batch_limit);
Expand Down

0 comments on commit 26eef68

Please sign in to comment.