winnow-rs / winnow

Making parsing a breeze
https://docs.rs/winnow
Other
525 stars 40 forks source link

Add impl `ErrorConvert` for `ContextError` #500

Closed Lexicality closed 5 months ago

Lexicality commented 6 months ago

Quick fix for #498

I didn't touch TreeError because I couldn't see a particularly easy way of converting input types on it other than rewriting the entire tree which seemed a bit over the top.

I added the InputError -> ContextError conversion because I could rather than because I needed it, I can remove it if you don't want it.

Lexicality commented 6 months ago

Huh, weird. It wouldn't build on my machine either but I assumed I had something configured wrong. :thinking:

epage commented 5 months ago

I added the InputError -> ContextError conversion because I could rather than because I needed it, I can remove it if you don't want it.

Let's remove that for now as its unrelated to the problem at hand and it would be good to understand the use case for why someone is doing it.

Lexicality commented 5 months ago

I added the InputError -> ContextError conversion because I could rather than because I needed it, I can remove it if you don't want it.

Let's remove that for now as its unrelated to the problem at hand and it would be good to understand the use case for why someone is doing it.

done

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 8643968260

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/error.rs 0 2 0.0%
<!-- Total: 0 2 0.0% -->
Totals Coverage Status
Change from base Build 8541132511: 0.005%
Covered Lines: 1275
Relevant Lines: 3049

💛 - Coveralls
codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 41.81%. Comparing base (8512ab7) to head (40a0a15).

Files Patch % Lines
src/error.rs 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #500 +/- ## ======================================= Coverage 41.81% 41.81% ======================================= Files 18 18 Lines 3047 3049 +2 ======================================= + Hits 1274 1275 +1 - Misses 1773 1774 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.