Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aeyakovenko committed May 17, 2018
1 parent 62e724e commit e318ce8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ impl Crdt {

// max number of nodes that we could be converged to
pub fn convergence(&self) -> u64 {
let min = self.remote
let max = self.remote.values().len() as u64 + 1;
self.remote
.values()
.fold(std::u64::MAX, |a, b| std::cmp::min(a, *b));
std::cmp::min(min, self.remote.values().len() as u64 + 1)
.fold(max, |a, b| std::cmp::min(a, *b))
}

fn random() -> u64 {
Expand Down

0 comments on commit e318ce8

Please sign in to comment.