Skip to content

Commit dce31ef

Browse files
committed
Cleanup query fn naming
1 parent 01bd1e1 commit dce31ef

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/ra_hir_def/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub trait DefDatabase: InternDatabase + AstDatabase + Upcast<dyn AstDatabase> {
112112
#[salsa::invoke(Documentation::documentation_query)]
113113
fn documentation(&self, def: AttrDefId) -> Option<Documentation>;
114114

115-
#[salsa::invoke(find_path::importable_locations_in_crate)]
115+
#[salsa::invoke(find_path::importable_locations_of_query)]
116116
fn importable_locations_of(
117117
&self,
118118
item: ItemInNs,

crates/ra_hir_def/src/find_path.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use std::sync::Arc;
44

55
use hir_expand::name::{known, AsName, Name};
6+
use ra_prof::profile;
67
use test_utils::tested_by;
78

89
use crate::{
@@ -18,7 +19,7 @@ use crate::{
1819
/// Find a path that can be used to refer to a certain item. This can depend on
1920
/// *from where* you're referring to the item, hence the `from` parameter.
2021
pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> {
21-
let _p = ra_prof::profile("find_path");
22+
let _p = profile("find_path");
2223
find_path_inner(db, item, from, MAX_PATH_LEN)
2324
}
2425

@@ -213,11 +214,12 @@ fn find_importable_locations(
213214
///
214215
/// Note that the crate doesn't need to be the one in which the item is defined;
215216
/// it might be re-exported in other crates.
216-
pub(crate) fn importable_locations_in_crate(
217+
pub(crate) fn importable_locations_of_query(
217218
db: &dyn DefDatabase,
218219
item: ItemInNs,
219220
krate: CrateId,
220221
) -> Arc<[(ModuleId, Name, Visibility)]> {
222+
let _p = profile("importable_locations_of_query");
221223
let def_map = db.crate_def_map(krate);
222224
let mut result = Vec::new();
223225
for (local_id, data) in def_map.modules.iter() {

0 commit comments

Comments
 (0)