Skip to content

Commit

Permalink
clippy: zip takes IntoIterator. (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Aug 24, 2023
1 parent bbeba90 commit 9f61270
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plot/src/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ where

let pairs = positions
.into_iter()
.zip(labels.into_iter())
.zip(labels)
.map(|(pos, label)| format!("'{}' {}", label.as_ref(), pos.f64()))
.collect::<Vec<_>>();

Expand Down
2 changes: 1 addition & 1 deletion src/csv_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<W: Write> CsvReportWriter<W> {
};
let throughput_num = throughput_num.as_deref();

for (count, measured_value) in data.iter_counts().iter().zip(data_scaled.into_iter()) {
for (count, measured_value) in data.iter_counts().iter().zip(data_scaled) {
let row = CsvRow {
group,
function,
Expand Down
2 changes: 1 addition & 1 deletion src/html/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ impl Html {
try_else_return!(fs::load(&entry.join("sample.json")), || None);
let avg_times = iters
.into_iter()
.zip(times.into_iter())
.zip(times)
.map(|(iters, time)| time / iters)
.collect::<Vec<_>>();

Expand Down
4 changes: 2 additions & 2 deletions src/plot/plotters_backend/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ fn draw_line_comarision_figure<XR: AsRangedCoord<Value = f64>, YR: AsRangedCoord
.draw()
.unwrap();

for (id, (name, xs, ys)) in (0..).zip(data.into_iter()) {
for (id, (name, xs, ys)) in (0..).zip(data) {
let series = chart
.draw_series(
LineSeries::new(
xs.into_iter().zip(ys.into_iter()),
xs.into_iter().zip(ys),
COMPARISON_COLORS[id % NUM_COLORS].filled(),
)
.point_size(POINT_SIZE),
Expand Down

0 comments on commit 9f61270

Please sign in to comment.