Closed wngr closed 5 months ago
Ah, I'm sorry, I missed this somehow.
I've published v0.4.7 which includes this and #26 (cc @asmello).
I'm really sorry ya'll have been running into so many issues with this crate. It's quite embarrassing. It was my first project in rust and I haven't shown it the due diligence it deserves.
I plan on circling back to it and cleaning it up once I finish with my JSON schema crate.
Thank you both for all the fixes.
That's alright, I think it's really just one class of bugs relating to empty strings and their interaction with slashes. RFC 6901 superficially looks nice and intuitive, but some details are quite surprising and idiosyncratic. The fact that "/"
points to a field keyed by ""
and ""
points to the root of the document is very confusing and unusual. It's quite easy to make incorrect assumptions.
Hi again 😏 !
Empty strings weren't correctly handled in
pop_back
: When callingpop_back
for the pointer//
, it would leave an empty string forPointer::inner
andPointer::count
at 1. Which is obviously wrong and leavesPointer
inconsistent.I also synchronized
fn back
with this, although in this case it was correct.Next time I create a PR I should probably just contribute a
quickcheck
for this crate directly ;-)