diff --git a/Cargo.toml b/Cargo.toml index 8555005..7fa821f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,7 @@ default = ["diff"] diff = [] [dependencies] -# jsonptr = "0.6.0" -jsonptr = { git = "https://github.com/asmello/jsonptr", branch = "main" } +jsonptr = "0.7.1" serde = { version = "1.0.159", features = ["derive"] } serde_json = "1.0.95" thiserror = "1.0.40" diff --git a/src/lib.rs b/src/lib.rs index b0b4456..ce72f62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,7 +92,7 @@ pub use self::diff::diff; struct WriteAdapter<'a>(&'a mut dyn fmt::Write); -impl<'a> std::io::Write for WriteAdapter<'a> { +impl std::io::Write for WriteAdapter<'_> { fn write(&mut self, buf: &[u8]) -> Result { let s = std::str::from_utf8(buf).unwrap(); self.0 diff --git a/tests/errors.yaml b/tests/errors.yaml index ead9373..470f147 100644 --- a/tests/errors.yaml +++ b/tests/errors.yaml @@ -47,13 +47,13 @@ - op: copy from: "/third/1~1" path: "/fourth" - error: "operation '/0' failed at path '/fourth': \"from\" path is invalid" + error: 'operation ''/0'' failed at path ''/fourth'': "from" path is invalid' - doc: *1 patch: - op: move from: "/third/1~1" path: "/fourth" - error: "operation '/0' failed at path '/fourth': \"from\" path is invalid" + error: 'operation ''/0'' failed at path ''/fourth'': "from" path is invalid' - doc: *1 patch: - op: move @@ -89,19 +89,19 @@ - op: add path: "first" value: true - error: "json pointer is malformed as it does not start with a backslash ('/')" + error: "json pointer failed to parse; does not start with a slash ('/') and is not empty" - doc: *1 patch: - op: replace path: "first" value: true - error: "json pointer is malformed as it does not start with a backslash ('/')" + error: "json pointer failed to parse; does not start with a slash ('/') and is not empty" - doc: *1 patch: - op: remove path: "first" value: true - error: "json pointer is malformed as it does not start with a backslash ('/')" + error: "json pointer failed to parse; does not start with a slash ('/') and is not empty" - doc: *1 patch: - op: add