mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 05:00:16 +00:00
Fix test after changing fuzzy matching for empty queries
This commit is contained in:
parent
3dee656490
commit
ef868ff023
1 changed files with 14 additions and 9 deletions
|
@ -319,15 +319,20 @@ mod tests {
|
|||
.into_iter()
|
||||
.map(|name| StringMatchCandidate::new(0, name.into()))
|
||||
.collect::<Vec<_>>();
|
||||
let matches = fuzzy::match_strings(
|
||||
&candidates,
|
||||
¶ms.query,
|
||||
true,
|
||||
100,
|
||||
&Default::default(),
|
||||
executor.clone(),
|
||||
)
|
||||
.await;
|
||||
let matches = if params.query.is_empty() {
|
||||
Vec::new()
|
||||
} else {
|
||||
fuzzy::match_strings(
|
||||
&candidates,
|
||||
¶ms.query,
|
||||
true,
|
||||
100,
|
||||
&Default::default(),
|
||||
executor.clone(),
|
||||
)
|
||||
.await
|
||||
};
|
||||
|
||||
Ok(Some(
|
||||
matches.into_iter().map(|mat| symbol(&mat.string)).collect(),
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue