Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chanced committed Jul 2, 2024
1 parent 17f082a commit 68b7079
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ impl PartialEq<Pointer> for String {
}
}


impl PartialEq<Pointer> for str {
fn eq(&self, other: &Pointer) -> bool {
self == &other.0
Expand Down Expand Up @@ -1455,19 +1454,18 @@ mod tests {
let invalid = serde_json::from_str::<&Pointer>("\"foo/bar\"");
assert!(invalid.is_err());
assert_eq!(
invalid.unwrap_err().to_string(),
invalid.unwrap_err().to_string(),
"failed to parse json pointer\n\ncaused by:\njson pointer is malformed as it does not start with a backslash ('/') at line 1 column 9"
);
}

#[test]
fn to_owned(){
fn to_owned() {
let ptr = Pointer::from_static("/bread/crumbs");
let buf = ptr.to_owned();
assert_eq!(buf, "/bread/crumbs");
}


#[test]
#[allow(clippy::cmp_owned)]
fn partial_eq() {
Expand Down

0 comments on commit 68b7079

Please sign in to comment.