Skip to content

Commit

Permalink
Added Hash impl to HSTRING
Browse files Browse the repository at this point in the history
  • Loading branch information
zardini123 committed Mar 10, 2024
1 parent 8bed196 commit 801ad8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/libs/core/src/strings/hstring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ impl Ord for HSTRING {
}
}

impl std::hash::Hash for HSTRING {
fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
self.as_wide().hash(hasher)
}
}

impl PartialOrd for HSTRING {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.cmp(other))
Expand Down

0 comments on commit 801ad8f

Please sign in to comment.