Skip to content

Commit 059b66a

Browse files
sjuddConvex, Inc.
authored and
Convex, Inc.
committed
Remove add_empty from term shortlist builder (#24830)
It's been quite a while so this should be safe. GitOrigin-RevId: 9a14480b1d8cbaff3f27bea30c7f540c666b445f
1 parent 228c0ca commit 059b66a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

crates/search/src/query.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,6 @@ impl TermShortlistBuilder {
240240
}
241241
}
242242

243-
fn add_empty(&mut self, term: QueryTerm) {
244-
// TODO(CX-5637): Remove the call to add_empty
245-
self.query_term_shortlist_items.entry(term).or_default();
246-
}
247-
248243
fn add_match(
249244
&mut self,
250245
term: QueryTerm,
@@ -301,8 +296,6 @@ pub(crate) fn shortlist_and_id_mapping(
301296
let mut shortlist_id_to_term_id = BTreeMap::new();
302297
let mut builder = TermShortlistBuilder::new();
303298
for (query_term, matches) in term_matches {
304-
// TODO(CX-5637): Remove the call to add_empty
305-
builder.add_empty(query_term.clone());
306299
for (distance, match_term, term_id) in matches {
307300
let new_shortlist_id = builder.add_match(query_term.clone(), match_term, distance);
308301
if let Some(new_shortlist_id) = new_shortlist_id {
@@ -317,8 +310,6 @@ impl TermShortlist {
317310
pub fn new(term_matches: BTreeMap<QueryTerm, BTreeSet<(EditDistance, Term)>>) -> Self {
318311
let mut builder = TermShortlistBuilder::new();
319312
for (query_term, matches) in term_matches {
320-
// TODO(CX-5637): Remove the call to add_empty
321-
builder.add_empty(query_term.clone());
322313
for (distance, match_term) in matches {
323314
builder.add_match(query_term.clone(), match_term, distance);
324315
}

0 commit comments

Comments
 (0)