diff options
author | Aleksey Kladov <[email protected]> | 2019-11-24 12:50:45 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-24 12:50:45 +0000 |
commit | 1956d57ed4896bb29dfcfaed2a5291ec69251f52 (patch) | |
tree | c74e88db824e751818e7f1c4f80a9251732cf3a7 /crates/ra_hir_def/src/nameres | |
parent | 8e36cb586038e2c12e6eceae57f7a95684fc6c6d (diff) |
Slightly reduce code duplication
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r-- | crates/ra_hir_def/src/nameres/raw.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index 552cbe544..198578753 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs | |||
@@ -17,10 +17,7 @@ use ra_syntax::{ | |||
17 | use test_utils::tested_by; | 17 | use test_utils::tested_by; |
18 | 18 | ||
19 | use crate::{ | 19 | use crate::{ |
20 | attr::{Attr, Attrs}, | 20 | attr::Attrs, db::DefDatabase, path::Path, FileAstId, HirFileId, LocalImportId, Source, |
21 | db::DefDatabase, | ||
22 | path::Path, | ||
23 | FileAstId, HirFileId, LocalImportId, Source, | ||
24 | }; | 21 | }; |
25 | 22 | ||
26 | /// `RawItems` is a set of top-level items in a file (except for impls). | 23 | /// `RawItems` is a set of top-level items in a file (except for impls). |
@@ -407,6 +404,6 @@ impl RawItemsCollector { | |||
407 | } | 404 | } |
408 | 405 | ||
409 | fn parse_attrs(&self, item: &impl ast::AttrsOwner) -> Attrs { | 406 | fn parse_attrs(&self, item: &impl ast::AttrsOwner) -> Attrs { |
410 | Attr::from_attrs_owner(item, &self.hygiene) | 407 | Attrs::new(item, &self.hygiene) |
411 | } | 408 | } |
412 | } | 409 | } |