From 4c146544c85fde05e977836d79334ff2eb909704 Mon Sep 17 00:00:00 2001 From: arriqaaq Date: Sat, 22 Feb 2025 08:38:28 +0530 Subject: [PATCH] update vart to 0.9.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/iter.rs | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf3bab3..823132f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -597,7 +597,7 @@ checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "vart" -version = "0.9.1" +version = "0.9.2" dependencies = [ "criterion", "divan", diff --git a/Cargo.toml b/Cargo.toml index 2192d49..20861b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vart" publish = true -version = "0.9.1" +version = "0.9.2" edition = "2021" license = "Apache-2.0" readme = "README.md" diff --git a/src/iter.rs b/src/iter.rs index d3f82fd..556650f 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -125,8 +125,7 @@ impl<'a, P: KeyTrait + 'a, V: Clone> Iterator for Iter<'a, P, V> { self.last_forward_key = Some(leaf.0); if self .last_forward_key - .zip(self.last_backward_key) - .map_or(true, |(k1, k2)| k1 < k2) + .zip(self.last_backward_key).is_none_or(|(k1, k2)| k1 < k2) { Some((leaf.0.as_slice(), &leaf.1.value, leaf.1.version, leaf.1.ts)) } else { @@ -167,8 +166,7 @@ impl<'a, P: KeyTrait + 'a, V: Clone> DoubleEndedIterator for Iter<'a, P, V> { self.last_backward_key = Some(leaf.0); if self .last_backward_key - .zip(self.last_forward_key) - .map_or(true, |(k1, k2)| k1 > k2) + .zip(self.last_forward_key).is_none_or(|(k1, k2)| k1 > k2) { Some((leaf.0.as_slice(), &leaf.1.value, leaf.1.version, leaf.1.ts)) } else { @@ -522,8 +520,7 @@ impl<'a, K: KeyTrait + Ord, V: Clone, R: RangeBounds> Iterator for Range<'a, if self .last_forward_key .as_ref() - .zip(self.last_backward_key.as_ref()) - .map_or(true, |(k1, k2)| k1 < k2) + .zip(self.last_backward_key.as_ref()).is_none_or(|(k1, k2)| k1 < k2) { Some((leaf.0.as_slice(), &leaf.1.value, leaf.1.version, leaf.1.ts)) } else { @@ -587,8 +584,7 @@ impl> DoubleEndedIterator for Ran if self .last_backward_key .as_ref() - .zip(self.last_forward_key.as_ref()) - .map_or(true, |(k1, k2)| k1 > k2) + .zip(self.last_forward_key.as_ref()).is_none_or(|(k1, k2)| k1 > k2) { Some((leaf.0.as_slice(), &leaf.1.value, leaf.1.version, leaf.1.ts)) } else {