aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-06-10 11:37:00 +0100
committerJonas Schievink <[email protected]>2020-06-10 11:40:33 +0100
commited2817e599a9c0e812af26587badad6da7a4d949 (patch)
tree7db98de12d6aff1d8327f0097bda247c58e083c0 /crates
parent56c7145993f94a12bf923f08cbd62d963e62bbd1 (diff)
Move limit check down
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs2
1 files changed, 1 insertions, 1 deletions
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 {
337 continue; 337 continue;
338 } 338 }
339 339
340 res.push(symbol.clone());
340 if res.len() >= self.limit { 341 if res.len() >= self.limit {
341 return res; 342 return res;
342 } 343 }
343 res.push(symbol.clone());
344 } 344 }
345 } 345 }
346 } 346 }