diff options
author | Aleksey Kladov <[email protected]> | 2018-10-20 20:02:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-20 20:02:41 +0100 |
commit | 998f2ae7627053a9363a05a1ab79359882dce39f (patch) | |
tree | 6be2e60ebae8c03d117edec200aa942d810b3e31 /crates/ra_analysis/src/symbol_index.rs | |
parent | c4b0d3cd56ab68f4fa23f7c1f6c76f7f6148153e (diff) |
remove job tokens
Diffstat (limited to 'crates/ra_analysis/src/symbol_index.rs')
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index 51eef8170..19f9ea47d 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use crate::{FileId, JobToken, Query}; | 1 | use crate::{FileId, Query}; |
2 | use fst::{self, Streamer}; | 2 | use fst::{self, Streamer}; |
3 | use ra_editor::{file_symbols, FileSymbol}; | 3 | use ra_editor::{file_symbols, FileSymbol}; |
4 | use ra_syntax::{ | 4 | use ra_syntax::{ |
@@ -59,7 +59,6 @@ impl Query { | |||
59 | pub(crate) fn search( | 59 | pub(crate) fn search( |
60 | self, | 60 | self, |
61 | indices: &[Arc<SymbolIndex>], | 61 | indices: &[Arc<SymbolIndex>], |
62 | token: &JobToken, | ||
63 | ) -> Vec<(FileId, FileSymbol)> { | 62 | ) -> Vec<(FileId, FileSymbol)> { |
64 | let mut op = fst::map::OpBuilder::new(); | 63 | let mut op = fst::map::OpBuilder::new(); |
65 | for file_symbols in indices.iter() { | 64 | for file_symbols in indices.iter() { |
@@ -69,7 +68,7 @@ impl Query { | |||
69 | let mut stream = op.union(); | 68 | let mut stream = op.union(); |
70 | let mut res = Vec::new(); | 69 | let mut res = Vec::new(); |
71 | while let Some((_, indexed_values)) = stream.next() { | 70 | while let Some((_, indexed_values)) = stream.next() { |
72 | if res.len() >= self.limit || token.is_canceled() { | 71 | if res.len() >= self.limit { |
73 | break; | 72 | break; |
74 | } | 73 | } |
75 | for indexed_value in indexed_values { | 74 | for indexed_value in indexed_values { |