From 0e49d8766941880c27f117832cad5f47f56007e4 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 21 Jul 2019 11:59:51 +0900 Subject: [PATCH] Remove #[allow(clippy::cast_ptr_alignment)] --- futures-util/src/compat/compat03as01.rs | 1 - futures-util/src/task/waker_ref.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/futures-util/src/compat/compat03as01.rs b/futures-util/src/compat/compat03as01.rs index b698435d53..a571826ec5 100644 --- a/futures-util/src/compat/compat03as01.rs +++ b/futures-util/src/compat/compat03as01.rs @@ -180,7 +180,6 @@ impl Current { fn as_waker(&self) -> WakerRef<'_> { unsafe fn ptr_to_current<'a>(ptr: *const ()) -> &'a Current { - #[allow(clippy::cast_ptr_alignment)] &*(ptr as *const Current) } fn current_to_ptr(current: &Current) -> *const () { diff --git a/futures-util/src/task/waker_ref.rs b/futures-util/src/task/waker_ref.rs index 9f0d5377e2..9e83742f54 100644 --- a/futures-util/src/task/waker_ref.rs +++ b/futures-util/src/task/waker_ref.rs @@ -63,7 +63,6 @@ where { // This uses the same mechanism as Arc::into_raw, without needing a reference. // This is potentially not stable - #![allow(clippy::cast_ptr_alignment)] let ptr = &*wake as &W as *const W as *const (); // Similar to `waker_vtable`, but with a no-op `drop` function.