Skip to content

Commit

Permalink
Use async move instead of lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleiserson committed Dec 19, 2024
1 parent 93274e4 commit 787c622
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ipa-core/src/query/runner/hybrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
sync::Arc,
};

use futures::{future::lazy, StreamExt, TryStreamExt};
use futures::{StreamExt, TryStreamExt};
use generic_array::ArrayLength;

use super::QueryResult;
Expand Down Expand Up @@ -107,7 +107,7 @@ where
config,
key_registry,
phantom_data: _,
} = self;
} = &self;

tracing::info!("New hybrid query: {config:?}");
let ctx = ctx.narrow(&Hybrid);
Expand All @@ -122,14 +122,14 @@ where
let stream = LengthDelimitedStream::<EncryptedHybridReport<BA8, BA3>, _>::new(input_stream)
.map_err(Into::into)
.try_flatten_iters()
.map(|enc_report_res| {
lazy(|_| enc_report_res.and_then(|enc_report| {
.map(|enc_report_res| async move {
enc_report_res.and_then(|enc_report| {
let dec_report = enc_report
.decrypt(key_registry.as_ref())
.map_err(Into::<Error>::into);
let unique_tag = UniqueTag::from_unique_bytes(&enc_report);
dec_report.map(|dec_report1| (dec_report1, unique_tag))
}))
})
})
.take(sz);

Expand Down

0 comments on commit 787c622

Please sign in to comment.