diff options
author | Kirill Bulatov <[email protected]> | 2021-06-10 21:03:16 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-06-10 21:43:46 +0100 |
commit | 3aaf07b8cb9a17669894db9f3e6afdb302676fdb (patch) | |
tree | 40887b0852021392418f7369d9c3ec27ab966b62 /crates/hir_def/src/per_ns.rs | |
parent | f4da4de7cdd4a7dfe40a417b0100b83ec50d1e1d (diff) |
Add more profiling for flyimports
Diffstat (limited to 'crates/hir_def/src/per_ns.rs')
-rw-r--r-- | crates/hir_def/src/per_ns.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir_def/src/per_ns.rs b/crates/hir_def/src/per_ns.rs index a594afce6..a9f13cb82 100644 --- a/crates/hir_def/src/per_ns.rs +++ b/crates/hir_def/src/per_ns.rs | |||
@@ -62,6 +62,7 @@ impl PerNs { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | pub fn filter_visibility(self, mut f: impl FnMut(Visibility) -> bool) -> PerNs { | 64 | pub fn filter_visibility(self, mut f: impl FnMut(Visibility) -> bool) -> PerNs { |
65 | let _p = profile::span("PerNs::filter_visibility"); | ||
65 | PerNs { | 66 | PerNs { |
66 | types: self.types.filter(|(_, v)| f(*v)), | 67 | types: self.types.filter(|(_, v)| f(*v)), |
67 | values: self.values.filter(|(_, v)| f(*v)), | 68 | values: self.values.filter(|(_, v)| f(*v)), |
@@ -86,6 +87,7 @@ impl PerNs { | |||
86 | } | 87 | } |
87 | 88 | ||
88 | pub fn iter_items(self) -> impl Iterator<Item = ItemInNs> { | 89 | pub fn iter_items(self) -> impl Iterator<Item = ItemInNs> { |
90 | let _p = profile::span("PerNs::iter_items"); | ||
89 | self.types | 91 | self.types |
90 | .map(|it| ItemInNs::Types(it.0)) | 92 | .map(|it| ItemInNs::Types(it.0)) |
91 | .into_iter() | 93 | .into_iter() |