chanced / jsonptr

JSON Pointer (RFC 6901) implementation for Rust
Apache License 2.0
44 stars 4 forks source link

Error on leading zeros when decoding indices #66

Closed asmello closed 3 months ago

asmello commented 3 months ago

In the process of migrating json-patch to version 0.5.1, I noticed one of their test cases was failing because we accept leading zeros and we shouldn't.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.1%. Comparing base (e6c64f8) to head (14d9f17).

Additional details and impacted files | [Files](https://app.codecov.io/gh/chanced/jsonptr/pull/66?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance) | Coverage Δ | | |---|---|---| | [src/assign.rs](https://app.codecov.io/gh/chanced/jsonptr/pull/66?src=pr&el=tree&filepath=src%2Fassign.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance#diff-c3JjL2Fzc2lnbi5ycw==) | `99.6% <100.0%> (+<0.1%)` | :arrow_up: | | [src/index.rs](https://app.codecov.io/gh/chanced/jsonptr/pull/66?src=pr&el=tree&filepath=src%2Findex.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance#diff-c3JjL2luZGV4LnJz) | `100.0% <100.0%> (ø)` | | | [src/pointer.rs](https://app.codecov.io/gh/chanced/jsonptr/pull/66?src=pr&el=tree&filepath=src%2Fpointer.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance#diff-c3JjL3BvaW50ZXIucnM=) | `98.2% <100.0%> (+<0.1%)` | :arrow_up: | | [src/resolve.rs](https://app.codecov.io/gh/chanced/jsonptr/pull/66?src=pr&el=tree&filepath=src%2Fresolve.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance#diff-c3JjL3Jlc29sdmUucnM=) | `100.0% <100.0%> (ø)` | | | [src/token.rs](https://app.codecov.io/gh/chanced/jsonptr/pull/66?src=pr&el=tree&filepath=src%2Ftoken.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chance#diff-c3JjL3Rva2VuLnJz) | `100.0% <100.0%> (ø)` | |
asmello commented 3 months ago

@chanced something to look at later: the coverage job is running for each commit, but it should only run in the pull request context. I think some other jobs are also running redundantly.

chanced commented 3 months ago

@asmello thanks for the mention, I didn't get a notification for this pull request either. I need to figure out why that is.

chanced commented 3 months ago

coverage :shrug:

😆 Speaking of which, I really need to go back and clean up the tests at some point.

chanced commented 2 months ago

@asmello ugh, I'm sorry. I meant to do a release when I pulled this down but didn't catch that it was aborted. v0.6.0 should be available now.

Screenshot 2024-08-10 at 1 31 35 PM
asmello commented 2 months ago

Ha, no problem, haven't gotten around to using it yet. Thanks for noticing!