Skip to content

Commit

Permalink
Merge pull request #2300 from zhiqiangxu/trivial
Browse files Browse the repository at this point in the history
chore: replace `record.iter().count()` with `record.len()`
  • Loading branch information
nazar-pc authored Dec 7, 2023
2 parents a84fda7 + d9a7c7b commit 7243fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/subspace-farmer-components/src/plotting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ where
// happen at most as many times as there is number of chunks in the record,
// otherwise `n+1` iterations could happen and update extra `encoded_chunk_used`
// unnecessarily causing issues down the line
.take(record.iter().count())
.take(record.len())
.zip(record.iter_mut())
// Write encoded chunk back so we can reuse original allocation
.map(|(input_chunk, output_chunk)| {
Expand Down

0 comments on commit 7243fb4

Please sign in to comment.