Skip to content

Commit 738be84

Browse files
authored
Update mod.rs
1 parent c3f432e commit 738be84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pg/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl AsyncPgConnection {
385385
.flat_map(|(bind_index, (bytes_0, bytes_1))| {
386386
std::iter::zip(bytes_0.unwrap_or_default(), bytes_1.unwrap_or_default())
387387
.enumerate()
388-
.filter_map(|(byte_index, bytes)| (bytes == (0, 1)).then_some((bind_index, byte_index)))
388+
.filter_map(move |(byte_index, bytes)| (bytes == (0, 1)).then_some((bind_index, byte_index)))
389389
})
390390
// Avoid storing the bind collectors in the returned Future
391391
.collect::<Vec<_>>();
@@ -407,9 +407,9 @@ impl AsyncPgConnection {
407407
// to borther with that at all
408408
if !metadata_lookup.unresolved_types.is_empty() {
409409
let metadata_cache = &mut *metadata_cache.lock().await;
410-
let real_oids = HashMap::<u32, u32>::new();
410+
let mut real_oids = HashMap::<u32, u32>::new();
411411

412-
for (index, (ref schema, ref lookup_type_name)) in metadata_lookup.unresolved_types.into_iter().enumerate() {
412+
for (index, (schema, lookup_type_name)) in metadata_lookup.unresolved_types.iter().enumerate() {
413413
// for each unresolved item
414414
// we check whether it's arleady in the cache
415415
// or perform a lookup and insert it into the cache

0 commit comments

Comments
 (0)