diff options
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 40bdc34f5..f279c2ad4 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -63,6 +63,7 @@ use ra_db::{CrateId, Edition, FileId}; | |||
63 | use ra_prof::profile; | 63 | use ra_prof::profile; |
64 | use ra_syntax::ast; | 64 | use ra_syntax::ast; |
65 | use rustc_hash::FxHashMap; | 65 | use rustc_hash::FxHashMap; |
66 | use stdx::format_to; | ||
66 | 67 | ||
67 | use crate::{ | 68 | use crate::{ |
68 | db::DefDatabase, | 69 | db::DefDatabase, |
@@ -246,7 +247,7 @@ impl CrateDefMap { | |||
246 | entries.sort_by_key(|(name, _)| name.clone()); | 247 | entries.sort_by_key(|(name, _)| name.clone()); |
247 | 248 | ||
248 | for (name, def) in entries { | 249 | for (name, def) in entries { |
249 | *buf += &format!("{}:", name); | 250 | format_to!(buf, "{}:", name); |
250 | 251 | ||
251 | if def.types.is_some() { | 252 | if def.types.is_some() { |
252 | *buf += " t"; | 253 | *buf += " t"; |
@@ -265,7 +266,7 @@ impl CrateDefMap { | |||
265 | } | 266 | } |
266 | 267 | ||
267 | for (name, child) in map.modules[module].children.iter() { | 268 | for (name, child) in map.modules[module].children.iter() { |
268 | let path = path.to_string() + &format!("::{}", name); | 269 | let path = &format!("{}::{}", path, name); |
269 | go(buf, map, &path, *child); | 270 | go(buf, map, &path, *child); |
270 | } | 271 | } |
271 | } | 272 | } |