mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
remove job tokens
This commit is contained in:
parent
c4b0d3cd56
commit
998f2ae762
4 changed files with 61 additions and 66 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{FileId, JobToken, Query};
|
||||
use crate::{FileId, Query};
|
||||
use fst::{self, Streamer};
|
||||
use ra_editor::{file_symbols, FileSymbol};
|
||||
use ra_syntax::{
|
||||
|
@ -59,7 +59,6 @@ impl Query {
|
|||
pub(crate) fn search(
|
||||
self,
|
||||
indices: &[Arc<SymbolIndex>],
|
||||
token: &JobToken,
|
||||
) -> Vec<(FileId, FileSymbol)> {
|
||||
let mut op = fst::map::OpBuilder::new();
|
||||
for file_symbols in indices.iter() {
|
||||
|
@ -69,7 +68,7 @@ impl Query {
|
|||
let mut stream = op.union();
|
||||
let mut res = Vec::new();
|
||||
while let Some((_, indexed_values)) = stream.next() {
|
||||
if res.len() >= self.limit || token.is_canceled() {
|
||||
if res.len() >= self.limit {
|
||||
break;
|
||||
}
|
||||
for indexed_value in indexed_values {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue