diff options
author | Taiki Endo <te316e89@gmail.com> | 2019-07-26 03:47:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 03:47:14 +0900 |
commit | fe021e6c008a886c1c6ad97c9f5f0c667fad34c6 (patch) | |
tree | 826239d95e6f7b6511a01ab93ecdcebb9aeab06e /tokio-executor | |
parent | f311ac3d4faa4fa1203ad5586a7676604ffe7736 (diff) |
ci: enable clippy lints (#1335)
Diffstat (limited to 'tokio-executor')
-rw-r--r-- | tokio-executor/src/global.rs | 2 | ||||
-rw-r--r-- | tokio-executor/src/park.rs | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tokio-executor/src/global.rs b/tokio-executor/src/global.rs index 49eeed80..6017d5f7 100644 --- a/tokio-executor/src/global.rs +++ b/tokio-executor/src/global.rs @@ -180,6 +180,8 @@ where unsafe fn hide_lt<'a>(p: *mut (dyn Executor + 'a)) -> *mut (dyn Executor + 'static) { use std::mem; + // false positive: https://github.com/rust-lang/rust-clippy/issues/2906 + #[allow(clippy::transmute_ptr_to_ptr)] mem::transmute(p) } diff --git a/tokio-executor/src/park.rs b/tokio-executor/src/park.rs index 35cd846b..e5d6acf4 100644 --- a/tokio-executor/src/park.rs +++ b/tokio-executor/src/park.rs @@ -218,6 +218,12 @@ impl Park for ParkThread { } } +impl Default for ParkThread { + fn default() -> Self { + Self::new() + } +} + // ===== impl UnparkThread ===== impl Unpark for UnparkThread { |