rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.67k stars 384 forks source link

Implement IntoIterator for Statuses #880

Closed schteve closed 1 year ago

schteve commented 1 year ago

Implement IntoIterator for Statuses via the existing iter() method so we get that sweet for-loop syntax sugar.

let statuses: Statuses = repo.statuses(None).unwrap();
for status in &statuses {
    // Do something
}