mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 01:48:28 +00:00
Consolidate redundant code
This commit is contained in:
parent
18e98b0d0b
commit
1611a250f2
@ -32,8 +32,8 @@ impl<T> Eq for Handle<T> {}
|
||||
|
||||
impl<T> Ord for Handle<T> {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
let self_ptr = Rc::as_ptr(&self.inner);
|
||||
let other_ptr = Rc::as_ptr(&other.inner);
|
||||
let [self_ptr, other_ptr] =
|
||||
[self, other].map(|handle| Rc::as_ptr(&handle.inner));
|
||||
|
||||
self_ptr.cmp(&other_ptr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user