Skip to content

Commit 3062969

Browse files
committed
small cleanup
1 parent b755c14 commit 3062969

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Cargo.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
[package]
22
name = "crdt"
3-
description = "Common CRDTs implemented in Rust"
4-
version = "0.1.0"
3+
description = "Practical serializable CRDTs (counters, LWW, ORSWOT) implemented in Rust"
4+
version = "0.0.1"
55
authors = ["Tyler Neely <[email protected]>"]
66
license = "Apache-2.0"
77
homepage = "https://github.com/spacejam/rust-crdt"
8-
keywords = ["crdt", "data structures", "distributed-systems"]
8+
keywords = ["crdt", "data structures", "distributed-systems", "vector clock", "orswot"]
99

1010
[[test]]
1111

1212
name = "test"
1313
path = "test/test.rs"
1414

1515
[dependencies]
16-
uuid = "0.1"
17-
protobuf = "1.0.18"
1816
rustc-serialize = "0.3.18"
1917
bincode = "0.5.1"
2018

src/orswot.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! The `orswot` crate provides an implementation of the OR-Set without tombstones (ORSWOT).
1+
//! The `orswot` crate provides an implementation of the addition-biased OR-Set without tombstones (ORSWOT).
22
//!
33
//! # Examples
44
//!
@@ -26,7 +26,6 @@ impl<Member: Ord + Clone, Actor: Ord + Clone> Orswot<Member, Actor> {
2626
pub fn add(&mut self, member: Member, actor: Actor) {
2727
let counter = self.clock.increment(actor.clone());
2828

29-
// TODO(tyler) riak_dt doesn't merge entry clocks on add. Is this a bug?
3029
let mut entry_clock = VClock::new();
3130
entry_clock.witness(actor, counter).unwrap();
3231

src/vclock.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ impl<A: Ord + Clone> VClock<A> {
114114
#[inline]
115115
pub fn contains_descendent_element(&self, actor: &A, counter: &Counter) -> bool {
116116
self.dots.get(actor)
117-
.map(|our_counter| our_counter >= counter)
118-
.unwrap_or(false)
117+
.map(|our_counter| our_counter >= counter)
118+
.unwrap_or(false)
119119
}
120120

121121
/// True if two vector clocks have diverged.

0 commit comments

Comments
 (0)