diff options
author | Alex Auvolat <alex@adnab.me> | 2023-01-26 17:26:32 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-01-26 17:26:32 +0100 |
commit | 8e93d6997415d60ba5c371da8b27065a57254a8c (patch) | |
tree | 8bf3c182ca5d70bd242cc691d2b1fee65c8b6cd3 /src/model/k2v/seen.rs | |
parent | 3113f6b5f2a688a3f7c4f933774866f48618f7d1 (diff) | |
download | garage-8e93d6997415d60ba5c371da8b27065a57254a8c.tar.gz garage-8e93d6997415d60ba5c371da8b27065a57254a8c.zip |
More clippy fixes
Diffstat (limited to 'src/model/k2v/seen.rs')
-rw-r--r-- | src/model/k2v/seen.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/model/k2v/seen.rs b/src/model/k2v/seen.rs index 51098710..8fe3a582 100644 --- a/src/model/k2v/seen.rs +++ b/src/model/k2v/seen.rs @@ -63,7 +63,7 @@ impl RangeSeenMarker { None => { self.items.insert(item.sort_key.clone(), cc.vector_clock); } - Some(ent) => *ent = vclock_max(&ent, &cc.vector_clock), + Some(ent) => *ent = vclock_max(ent, &cc.vector_clock), } } } @@ -71,7 +71,7 @@ impl RangeSeenMarker { pub fn canonicalize(&mut self) { let self_vc = &self.vector_clock; - self.items.retain(|_sk, vc| vclock_gt(&vc, self_vc)) + self.items.retain(|_sk, vc| vclock_gt(vc, self_vc)) } pub fn encode(&mut self) -> Result<String, Error> { @@ -84,7 +84,7 @@ impl RangeSeenMarker { /// Decode from msgpack+zstd+b64 representation, returns None on error. pub fn decode(s: &str) -> Option<Self> { - let bytes = BASE64_STANDARD.decode(&s).ok()?; + let bytes = BASE64_STANDARD.decode(s).ok()?; let bytes = zstd::stream::decode_all(&mut &bytes[..]).ok()?; nonversioned_decode(&bytes).ok() } @@ -99,7 +99,7 @@ impl RangeSeenMarker { && self .items .get(&item.sort_key) - .map(|vc| vclock_gt(&cc.vector_clock, &vc)) + .map(|vc| vclock_gt(&cc.vector_clock, vc)) .unwrap_or(true) } } |