nom icon indicating copy to clipboard operation
nom copied to clipboard

For `many` and `fold`, consider `..0` an invalid range, just as `0..0` is

Open cky opened this issue 3 years ago • 3 comments

nom::multi::many and nom::many::fold consider empty ranges, as checked by NomRange::is_inverted, to be invalid. Unfortunately, that method is incorrectly implemented for RangeTo, meaning that ..0 is not considered invalid when it should be.

While I'm here, I also fixed up off-by-one errors in RangeFrom::bounded_iter and RangeFull::bounded_iter.

cky avatar Jan 31 '23 02:01 cky

Pull Request Test Coverage Report for Build 4050233552

  • 6 of 9 (66.67%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 62.55%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/traits.rs 6 9 66.67%
<!-- Total: 6 9
Files with Coverage Reduction New Missed Lines %
src/character/streaming.rs 1 78.38%
<!-- Total: 1
Totals Coverage Status
Change from base Build 3981619336: 0.3%
Covered Lines: 1560
Relevant Lines: 2494

💛 - Coveralls

coveralls avatar Jan 31 '23 02:01 coveralls