Skip to content

Commit

Permalink
update comment in fn is_continuous_ents
Browse files Browse the repository at this point in the history
Signed-off-by: storagezhang <[email protected]>

Co-authored-by: NingLin-P <[email protected]>
  • Loading branch information
storagezhang and NingLin-P authored Mar 15, 2021
1 parent 7e8c08e commit ab54349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 73,7 @@ pub fn limit_size<T: PbMessage Clone>(entries: &mut Vec<T>, max: Option<u64>)
}

/// Check whether the entry is continuous to the message.
/// i.e msg's next entry index should be equal to the first entries' index
/// i.e msg's next entry index should be equal to the index of the first entry in `ents`
pub fn is_continuous_ents(msg: &Message, ents: &[Entry]) -> bool {
if !msg.entries.is_empty() && !ents.is_empty() {
let expected_next_idx = msg.entries.last().unwrap().index 1;
Expand Down

0 comments on commit ab54349

Please sign in to comment.