mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Stop calling deref() and deref_mut() explicitly.
This commit is contained in:
parent
ee4c56bd8b
commit
13c7cf928a
14 changed files with 56 additions and 57 deletions
|
@ -69,7 +69,7 @@ pub fn breakpoint() {
|
|||
// Workaround for lack of `ptr_eq` on Arcs...
|
||||
#[inline]
|
||||
pub fn arc_ptr_eq<T: 'static + Send + Sync>(a: &Arc<T>, b: &Arc<T>) -> bool {
|
||||
let a: &T = a.deref();
|
||||
let b: &T = b.deref();
|
||||
let a: &T = &**a;
|
||||
let b: &T = &**b;
|
||||
(a as *const T) == (b as *const T)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue