Skip to content

Commit

Permalink
added partialeq to RawValue
Browse files Browse the repository at this point in the history
  • Loading branch information
rydb committed Jan 13, 2025
1 parent 9802c08 commit 380c830
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ pub struct RawValue {
json: str,
}

impl PartialEq for RawValue {
fn eq(&self, other: &Self) -> bool {
self.json == other.json
}
}

impl RawValue {
const fn from_borrowed(json: &str) -> &Self {
unsafe { mem::transmute::<&str, &RawValue>(json) }
Expand Down

0 comments on commit 380c830

Please sign in to comment.