Skip to content

Commit

Permalink
consume the results of the select
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonm1 committed Jul 17, 2024
1 parent 635c7bf commit b802693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ fn begin(
if !scans.is_empty() {
let mut scan = txn.prepare_cached(SCAN)?;
for random_hex in &scans {
_ = scan.query_map([random_hex], |row| row.get::<_, i32>(0))?;
// Consume the results
scan.query_map([random_hex], |row| row.get::<_, i32>(0))?
.filter_map(Result::ok)
.for_each(drop);
}
}

Expand Down

0 comments on commit b802693

Please sign in to comment.