mirror of https://github.com/poanetwork/hbbft.git
Merge pull request #132 from poanetwork/mbr-fix-new-clippy-lints
Fix clippy lints.
This commit is contained in:
commit
97e0505d11
|
@ -63,7 +63,7 @@ impl BinValues {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn contains(&self, b: bool) -> bool {
|
||||
pub fn contains(self, b: bool) -> bool {
|
||||
match self {
|
||||
BinValues::None => false,
|
||||
BinValues::Both => true,
|
||||
|
@ -73,7 +73,7 @@ impl BinValues {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_subset(&self, other: BinValues) -> bool {
|
||||
pub fn is_subset(self, other: BinValues) -> bool {
|
||||
match self {
|
||||
BinValues::None => true,
|
||||
BinValues::False if other == BinValues::False || other == BinValues::Both => true,
|
||||
|
@ -83,7 +83,7 @@ impl BinValues {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn definite(&self) -> Option<bool> {
|
||||
pub fn definite(self) -> Option<bool> {
|
||||
match self {
|
||||
BinValues::False => Some(false),
|
||||
BinValues::True => Some(true),
|
||||
|
|
|
@ -89,7 +89,7 @@ where
|
|||
|
||||
/// Returns an iterator over all pending votes that are newer than their voter's committed
|
||||
/// vote.
|
||||
pub fn pending_votes<'a>(&'a self) -> impl Iterator<Item = &'a SignedVote<NodeUid>> {
|
||||
pub fn pending_votes(&self) -> impl Iterator<Item = &SignedVote<NodeUid>> {
|
||||
self.pending.values().filter(move |signed_vote| {
|
||||
self.committed
|
||||
.get(&signed_vote.voter)
|
||||
|
|
Loading…
Reference in New Issue