Skip to content

Commit aae25fe

Browse files
committed
typosquat/database: Avoid crates mutation while still borrowed
For some reason the Rust borrow checker is not currently complaining about this, but once the code is migrated to `diesel-async` it starts to fail the build.
1 parent bc222a0 commit aae25fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/typosquat/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl TopCrates {
6767
// term.
6868
for result in crate_owners::table
6969
.filter(crate_owners::deleted.eq(false))
70-
.filter(crate_owners::crate_id.eq_any(crates.keys().collect::<Vec<_>>()))
70+
.filter(crate_owners::crate_id.eq_any(crates.keys().cloned().collect::<Vec<_>>()))
7171
.select((
7272
crate_owners::crate_id,
7373
crate_owners::owner_id,

0 commit comments

Comments
 (0)