Skip to content

Commit 50821c3

Browse files
committed
Feature: impl PartialEq for Entry
1 parent f28a0ef commit 50821c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

openraft/src/entry.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ impl<C: RaftTypeConfig> Default for Entry<C> {
8181
}
8282
}
8383

84+
impl<C: RaftTypeConfig> PartialEq for Entry<C>
85+
where C::D: PartialEq
86+
{
87+
fn eq(&self, other: &Self) -> bool {
88+
self.log_id == other.log_id && self.payload == other.payload
89+
}
90+
}
91+
8492
impl<C: RaftTypeConfig> AsRef<Entry<C>> for Entry<C> {
8593
fn as_ref(&self) -> &Entry<C> {
8694
self

0 commit comments

Comments
 (0)