mirror of
https://github.com/hannobraun/Fornjot
synced 2025-10-26 01:38:06 +00:00
Make sure Eq and Hash impls of Scalar match
This commit is contained in:
parent
2ef096b2fb
commit
d9ce7f436c
@ -159,7 +159,9 @@ impl Scalar {
|
|||||||
|
|
||||||
impl PartialEq for Scalar {
|
impl PartialEq for Scalar {
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
self.value == other.value
|
// Using `R64` here to make sure that this matches the `Eq`/`PartialEq`
|
||||||
|
// implementation, as required by `Hash`.
|
||||||
|
R64::from_inner(self.value).eq(&R64::from_inner(other.value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user