chanced / jsonptr

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

`PointerBuf::append` should have a generic param #43

Closed chanced closed 1 month ago

chanced commented 2 months ago
pub fn append(&mut self, other: &PointerBuf) -> &PointerBuf

I think it'd be nice to be able to append a Pointer or PointerBuf here. AsRef<Pointer> maybe?

asmello commented 2 months ago

Great idea! Generally we should have APIs that take a &Pointer take the more general AsRef<Pointer>, like std::path does with &Path 👍