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()
|
.into_iter()
|
||||||
.map(|name| StringMatchCandidate::new(0, name.into()))
|
.map(|name| StringMatchCandidate::new(0, name.into()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let matches = fuzzy::match_strings(
|
let matches = if params.query.is_empty() {
|
||||||
&candidates,
|
Vec::new()
|
||||||
¶ms.query,
|
} else {
|
||||||
true,
|
fuzzy::match_strings(
|
||||||
100,
|
&candidates,
|
||||||
&Default::default(),
|
¶ms.query,
|
||||||
executor.clone(),
|
true,
|
||||||
)
|
100,
|
||||||
.await;
|
&Default::default(),
|
||||||
|
executor.clone(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
};
|
||||||
|
|
||||||
Ok(Some(
|
Ok(Some(
|
||||||
matches.into_iter().map(|mat| symbol(&mat.string)).collect(),
|
matches.into_iter().map(|mat| symbol(&mat.string)).collect(),
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue