From 5a56ac4b72e7f57fb20d49bcf531611f144cc0e0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 13 Aug 2018 17:19:27 +0300 Subject: Better limiting --- crates/server/src/main_loop/handlers.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/server/src/main_loop') diff --git a/crates/server/src/main_loop/handlers.rs b/crates/server/src/main_loop/handlers.rs index e9dc78420..bfdfcb51e 100644 --- a/crates/server/src/main_loop/handlers.rs +++ b/crates/server/src/main_loop/handlers.rs @@ -110,10 +110,11 @@ pub fn handle_workspace_symbol( if !all_symbols { q.only_types(); } + q.limit(128); q }; - for (path, symbol) in world.world_symbols(query).take(128) { + for (path, symbol) in world.world_symbols(query) { let line_index = world.file_line_index(path)?; let info = SymbolInformation { name: symbol.name.to_string(), -- cgit v1.2.3