Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Dec 19, 2024
1 parent 31ff50a commit b104be2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ipa-core/src/bin/report_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
clients,
|query_id| {
if let Some(ref url_file_list) = url_file_list {
inputs_from_url_file(&url_file_list, query_id, args.shard_count)
inputs_from_url_file(url_file_list, query_id, args.shard_count)
} else if let Some(ref encrypted_inputs) = encrypted_inputs {
Ok(inputs_from_encrypted_inputs(
encrypted_inputs,
Expand Down Expand Up @@ -318,19 +318,19 @@ fn inputs_from_url_file(
let mut file = BufReader::new(File::open(url_file_path)?);
let mut buf = String::new();
let mut inputs = [Vec::new(), Vec::new(), Vec::new()];
for helper_id in 0..3 {
for (helper_id, helper_input) in inputs.iter_mut().enumerate() {
for _ in 0..shard_count {
buf.clear();
if file.read_line(&mut buf)? == 0 {
break;
}
inputs[helper_id]
helper_input
.push(Uri::try_from(buf.trim()).map_err(|e| format!("Invalid URL {buf:?}: {e}"))?);
}
if inputs[helper_id].len() != shard_count {
if helper_input.len() != shard_count {
return Err(format!(
"Helper {helper_id} does not have enough input. Expected {shard_count}, got {}",
inputs[helper_id].len()
helper_input.len()
)
.into());
}
Expand Down Expand Up @@ -376,8 +376,8 @@ fn inputs_from_encrypted_inputs(
// create byte streams for each shard
h1_streams
.into_iter()
.zip(h2_streams.into_iter())
.zip(h3_streams.into_iter())
.zip(h2_streams)
.zip(h3_streams)
.map(|((s1, s2), s3)| {
[
QueryInput::Inline {
Expand Down

0 comments on commit b104be2

Please sign in to comment.