From 998f2ae7627053a9363a05a1ab79359882dce39f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 20 Oct 2018 22:02:41 +0300 Subject: remove job tokens --- crates/ra_analysis/src/symbol_index.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis/src/symbol_index.rs') 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 @@ -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], - 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 { -- cgit v1.2.3 From 6e88aaef5d49c8ec7b6ffe6b41457c3a028b4eb0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 20 Oct 2018 22:38:47 +0300 Subject: use pythonic import order use std // blank line use extern crates // blank line use crate::{} --- crates/ra_analysis/src/symbol_index.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crates/ra_analysis/src/symbol_index.rs') diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index 19f9ea47d..a0f3c0437 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs @@ -1,4 +1,8 @@ -use crate::{FileId, Query}; +use std::{ + hash::{Hash, Hasher}, + sync::Arc, +}; + use fst::{self, Streamer}; use ra_editor::{file_symbols, FileSymbol}; use ra_syntax::{ @@ -7,10 +11,7 @@ use ra_syntax::{ }; use rayon::prelude::*; -use std::{ - hash::{Hash, Hasher}, - sync::Arc, -}; +use crate::{FileId, Query}; #[derive(Debug)] pub(crate) struct SymbolIndex { -- cgit v1.2.3