Skip to content

Commit 3c952c9

Browse files
committed
refactor
1 parent 964fef4 commit 3c952c9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/table/data_block/iter.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ impl<'a> Iter<'a> {
125125
std::cmp::Ordering::Greater => {
126126
return true;
127127
}
128-
std::cmp::Ordering::Equal => {
129-
// Consume all items equal to the needle to enforce strictness
130-
self.decoder.next().expect("should exist");
131-
}
132-
std::cmp::Ordering::Less => {
128+
std::cmp::Ordering::Equal | std::cmp::Ordering::Less => {
133129
self.decoder.next().expect("should exist");
134130
}
135131
}
@@ -156,11 +152,7 @@ impl<'a> Iter<'a> {
156152
std::cmp::Ordering::Less => {
157153
return true;
158154
}
159-
std::cmp::Ordering::Equal => {
160-
// Consume all items equal to the needle from the high end
161-
self.decoder.next_back().expect("should exist");
162-
}
163-
std::cmp::Ordering::Greater => {
155+
std::cmp::Ordering::Equal | std::cmp::Ordering::Greater => {
164156
self.decoder.next_back().expect("should exist");
165157
}
166158
}

0 commit comments

Comments
 (0)