Stop calling deref() and deref_mut() explicitly.

This commit is contained in:
Ms2ger 2015-01-22 14:49:14 +01:00
parent ee4c56bd8b
commit 13c7cf928a
14 changed files with 56 additions and 57 deletions

View file

@ -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)
}