Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleiserson committed Dec 19, 2024
1 parent d607dec commit 878a3c5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
27 changes: 15 additions & 12 deletions ipa-core/src/query/runner/hybrid.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use std::{
convert::{Infallible, Into}, marker::PhantomData, ops::Add, sync::Arc
convert::{Infallible, Into},
marker::PhantomData,
ops::Add,
sync::Arc,
};

use futures::{future::lazy, StreamExt, TryStreamExt};
Expand All @@ -16,7 +19,10 @@ use crate::{
Serializable, U128Conversions,
},
helpers::{
query::{DpMechanism, HybridQueryParams, QueryConfig, QuerySize}, setup_cross_shard_prss, stream::TryFlattenItersExt, BodyStream, Gateway, LengthDelimitedStream
query::{DpMechanism, HybridQueryParams, QueryConfig, QuerySize},
setup_cross_shard_prss,
stream::TryFlattenItersExt,
BodyStream, Gateway, LengthDelimitedStream,
},
hpke::PrivateKeyRegistry,
protocol::{
Expand Down Expand Up @@ -117,16 +123,13 @@ where
.map_err(Into::into)
.try_flatten_iters()
.map(|enc_report_res| {
lazy(|_| match enc_report_res {
Ok(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))
}
Err(err) => Err(err.into()),
})
lazy(|_| 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
2 changes: 1 addition & 1 deletion ipa-metrics-prometheus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
default = []

[dependencies]
ipa-metrics = { path = "../ipa-metrics" }
ipa-metrics = { path = "../ipa-metrics", features = ["partitions"] }

# Open telemetry crates: opentelemetry-prometheus crate implementation is based on Opentelemetry API and SDK 0.23. (TBC)
opentelemetry = "0.24"
Expand Down

0 comments on commit 878a3c5

Please sign in to comment.