From ed2817e599a9c0e812af26587badad6da7a4d949 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 10 Jun 2020 12:37:00 +0200 Subject: Move limit check down --- crates/ra_ide_db/src/symbol_index.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index c974891ea..ac0a201df 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -337,10 +337,10 @@ impl Query { continue; } + res.push(symbol.clone()); if res.len() >= self.limit { return res; } - res.push(symbol.clone()); } } } -- cgit v1.2.3