Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(line): implement iterators for Line #896

Merged
merged 1 commit into from
Jan 31, 2024
Merged

feat(line): implement iterators for Line #896

merged 1 commit into from
Jan 31, 2024

Conversation

joshka
Copy link
Member

@joshka joshka commented Jan 31, 2024

This allows iterating over the Spans of a line using for loops and
other iterator methods.

  • add iter and iter_mut methods to Line
  • implement IntoIterator for Line, &Line, and &mut Line traits
  • update call sites to iterate over Line rather than Line::spans

This allows iterating over the `Span`s of a line using `for` loops and
other iterator methods.

- add `iter` and `iter_mut` methods to `Line`
- implement `IntoIterator` for `Line`, `&Line`, and `&mut Line` traits
- update call sites to iterate over `Line` rather than `Line::spans`
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78f1c14) 91.9% compared to head (dc26315) 91.9%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #896   +/-   ##
=====================================
  Coverage   91.9%   91.9%           
=====================================
  Files         60      60           
  Lines      15386   15419   +33     
=====================================
+ Hits       14151   14184   +33     
  Misses      1235    1235           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Valentin271 Valentin271 merged commit 4278b40 into main Jan 31, 2024
34 checks passed
@Valentin271 Valentin271 deleted the line-iter branch January 31, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants