chanced / jsonptr

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

Add fluid methods to `PointerBuf` #31

Open chanced opened 3 months ago

chanced commented 3 months ago

Add fluid methods to Pointer that mutate in place and return a new instance.

this is somewhat obnoxious to deal with:

let mut instance_location = self.instance_location.clone();
instance_location.push_back(instance.into());
let mut keyword_location = self.keyword_location.clone();
keyword_location.push_back(keyword.into());