Skip to content

Commit 45fbe20

Browse files
authored
Merge pull request #11 from chanced/add-quotes-to-debug-output
adds quotes around `Pointer` debug output
2 parents cd9055f + 1fd1cd2 commit 45fbe20

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["json-pointer", "rfc-6901", "6901"]
88
license = "MIT OR Apache-2.0"
99
name = "jsonptr"
1010
repository = "https://github.com/chanced/jsonptr"
11-
version = "0.3.5"
11+
version = "0.3.6"
1212

1313
[dependencies]
1414
fluent-uri = { version = "0.1.4", optional = true, default-features = false }

src/pointer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ impl Pointer {
326326
}
327327
}
328328
}
329+
329330
/// Attempts to resolve a mutable `Value` based on the path in this `Pointer`.
330331
pub fn resolve_mut<'v>(&self, value: &'v mut Value) -> Result<&'v mut Value, Error> {
331332
let ResolvedMut {
@@ -1113,7 +1114,7 @@ impl core::hash::Hash for Pointer {
11131114

11141115
impl core::fmt::Debug for Pointer {
11151116
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1116-
write!(f, "{}", self.inner)
1117+
write!(f, "\"{}\"", self.inner)
11171118
}
11181119
}
11191120
impl core::fmt::Display for Pointer {

0 commit comments

Comments
 (0)