From a5aa8239a5fff28e73e272bf108d08c3a15a579c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 12 Apr 2019 18:42:13 -0700 Subject: [PATCH] clippy: Resolve const_static_lifetime TEST=bin/clippy Change-Id: I51453ae1a6b6c6bf9c105a41352fd95500f76b05 Reviewed-on: https://chromium-review.googlesource.com/1566662 Commit-Ready: David Tolnay Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: Daniel Verkamp --- bin/clippy | 1 - devices/src/virtio/input/mod.rs | 2 +- rand_ish/src/lib.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/clippy b/bin/clippy index 8b38188675..c7eed64f88 100755 --- a/bin/clippy +++ b/bin/clippy @@ -13,7 +13,6 @@ cd .. SUPPRESS=( # To be resolved. - const_static_lifetime extra_unused_lifetimes into_iter_on_array let_and_return diff --git a/devices/src/virtio/input/mod.rs b/devices/src/virtio/input/mod.rs index b44ca86566..95c4ab739b 100644 --- a/devices/src/virtio/input/mod.rs +++ b/devices/src/virtio/input/mod.rs @@ -29,7 +29,7 @@ use std::thread; const EVENT_QUEUE_SIZE: u16 = 64; const STATUS_QUEUE_SIZE: u16 = 64; -const QUEUE_SIZES: &'static [u16] = &[EVENT_QUEUE_SIZE, STATUS_QUEUE_SIZE]; +const QUEUE_SIZES: &[u16] = &[EVENT_QUEUE_SIZE, STATUS_QUEUE_SIZE]; #[derive(Debug)] pub enum InputError { diff --git a/rand_ish/src/lib.rs b/rand_ish/src/lib.rs index 80022b7ed8..84d1a16a29 100644 --- a/rand_ish/src/lib.rs +++ b/rand_ish/src/lib.rs @@ -33,7 +33,7 @@ impl SimpleRng { fn uniform_sample_ascii_alphanumeric( b: Result, ) -> Option> { - const ASCII_CHARS: &'static [u8] = b"\ + const ASCII_CHARS: &[u8] = b"\ ABCDEFGHIJKLMNOPQRSTUVWXYZ\ abcdefghijklmnopqrstuvwxyz\ 0123456789";