From 826238503f66b58417536ad5879e69e4f23fa775 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 22 Jul 2022 10:09:22 +0900 Subject: [PATCH] Fix clippy::explicit_auto_deref warning ``` warning: deref which would be done by auto-deref --> crossbeam-epoch/src/atomic.rs:1715:43 | 1715 | let arr: &[MaybeUninit] = &*owned; | ^^^^^^ help: try this: `owned` | = note: `#[warn(clippy::explicit_auto_deref)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref warning: deref which would be done by auto-deref --> crossbeam-skiplist/src/base.rs:1045:21 | 1045 | (*n).refs_and_height | ^^^^ help: try this: `n` | = note: `#[warn(clippy::explicit_auto_deref)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref ``` --- crossbeam-epoch/src/atomic.rs | 2 +- crossbeam-skiplist/src/base.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crossbeam-epoch/src/atomic.rs b/crossbeam-epoch/src/atomic.rs index 894ae15aa..7aa314c21 100644 --- a/crossbeam-epoch/src/atomic.rs +++ b/crossbeam-epoch/src/atomic.rs @@ -1712,7 +1712,7 @@ mod tests { #[test] fn array_init() { let owned = Owned::<[MaybeUninit]>::init(10); - let arr: &[MaybeUninit] = &*owned; + let arr: &[MaybeUninit] = &owned; assert_eq!(arr.len(), 10); } } diff --git a/crossbeam-skiplist/src/base.rs b/crossbeam-skiplist/src/base.rs index 72861643c..403690fad 100644 --- a/crossbeam-skiplist/src/base.rs +++ b/crossbeam-skiplist/src/base.rs @@ -1042,7 +1042,7 @@ where } // Installation failed. Decrement the reference count. - (*n).refs_and_height + n.refs_and_height .fetch_sub(1 << HEIGHT_BITS, Ordering::Relaxed); // We don't have the most up-to-date search results. Repeat the search.