Skip to content

Commit

Permalink
Merge pull request #11 from chanced/add-quotes-to-debug-output
Browse files Browse the repository at this point in the history
adds quotes around `Pointer` debug output
  • Loading branch information
chanced authored May 23, 2023
2 parents cd9055f + 1fd1cd2 commit 45fbe20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["json-pointer", "rfc-6901", "6901"]
license = "MIT OR Apache-2.0"
name = "jsonptr"
repository = "https://github.com/chanced/jsonptr"
version = "0.3.5"
version = "0.3.6"

[dependencies]
fluent-uri = { version = "0.1.4", optional = true, default-features = false }
Expand Down
3 changes: 2 additions & 1 deletion src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ impl Pointer {
}
}
}

/// Attempts to resolve a mutable `Value` based on the path in this `Pointer`.
pub fn resolve_mut<'v>(&self, value: &'v mut Value) -> Result<&'v mut Value, Error> {
let ResolvedMut {
Expand Down Expand Up @@ -1113,7 +1114,7 @@ impl core::hash::Hash for Pointer {

impl core::fmt::Debug for Pointer {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.inner)
write!(f, "\"{}\"", self.inner)
}
}
impl core::fmt::Display for Pointer {
Expand Down

0 comments on commit 45fbe20

Please sign in to comment.