matthiaskrgr / matthiaskrgr/cargo-cache
stats_from_file_desc_list: dont manually zip list
Open
Nobody has claimed this yet.
refactor
- Dominant language
- Rust
- Stars
- 994
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
use use x.iter().zip(x.iter().skip(1))
pub fn main() {
let i = &[1, 2, 3, 4, 5, 6];
i.iter()
.zip(i.iter().skip(1))
.for_each(|(a, b)| println!("{} {}", a, b));
}
1 2
2 3
3 4
4 5
5 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate stats_from_file_desc_list and inspect how it currently pairs adjacent entries. Compare that logic with the suggested iter().zip(iter().skip(1)) approach, then run the relevant existing checks or command to confirm the reported statistics and output remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100