Merge pull request #132 from poanetwork/mbr-fix-new-clippy-lints

Fix clippy lints.
This commit is contained in:
Vladimir Komendantskiy 2018-07-13 10:34:07 +01:00 committed by GitHub
commit 97e0505d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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),

View File

@ -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)