Skip to content

Commit daa2072

Browse files
committed
toplevel_ref_arg
1 parent 386d438 commit daa2072

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ non_canonical_clone_impl = "allow"
180180
non_canonical_partial_ord_impl = "allow"
181181
self_named_constructors = "allow"
182182
too_many_arguments = "allow"
183-
toplevel_ref_arg = "allow"
184183
type_complexity = "allow"
185184
unnecessary_cast = "allow"
186185
unnecessary_filter_map = "allow"

crates/hir-def/src/import_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ impl Query {
396396
pub fn search_dependencies(
397397
db: &dyn DefDatabase,
398398
krate: CrateId,
399-
ref query: Query,
399+
query: &Query,
400400
) -> FxHashSet<ItemInNs> {
401401
let _p = tracing::span!(tracing::Level::INFO, "search_dependencies", ?query).entered();
402402

@@ -516,7 +516,7 @@ mod tests {
516516
})
517517
.expect("could not find crate");
518518

519-
let actual = search_dependencies(db.upcast(), krate, query)
519+
let actual = search_dependencies(db.upcast(), krate, &query)
520520
.into_iter()
521521
.filter_map(|dependency| {
522522
let dependency_krate = dependency.krate(db.upcast())?;

crates/hir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl Crate {
236236
query: import_map::Query,
237237
) -> impl Iterator<Item = Either<ModuleDef, Macro>> {
238238
let _p = tracing::span!(tracing::Level::INFO, "query_external_importables");
239-
import_map::search_dependencies(db, self.into(), query).into_iter().map(|item| {
239+
import_map::search_dependencies(db, self.into(), &query).into_iter().map(|item| {
240240
match ItemInNs::from(item) {
241241
ItemInNs::Types(mod_id) | ItemInNs::Values(mod_id) => Either::Left(mod_id),
242242
ItemInNs::Macros(mac_id) => Either::Right(mac_id),

0 commit comments

Comments
 (0)