summary refs log tree commit diff
path: root/vhost/src
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-10-16 13:21:20 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-08 22:18:17 +0000
commit0124500a281be85eb4bc671cdfd4fb3bfe3b30fb (patch)
tree7ab7315bdcd022db494cf4205a178976ff8bd143 /vhost/src
parent6787ff3f0f7ce9cd5576189dc34ae03cb6ad9421 (diff)
downloadcrosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar.gz
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar.bz2
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar.lz
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar.xz
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.tar.zst
crosvm-0124500a281be85eb4bc671cdfd4fb3bfe3b30fb.zip
Remove unnecessary static str lifetimes
Const and static variables imply a static lifetime, so declaring it
isn't necessary.

Fixes clippy warnings of the form:

  Statics have by default a `'static` lifetime

BUG=None
TEST=bin/clippy

Change-Id: I99e63b435b6b2fd5fbce9ef617e89ec114587ad7
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896087
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'vhost/src')
-rw-r--r--vhost/src/net.rs2
-rw-r--r--vhost/src/vsock.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/vhost/src/net.rs b/vhost/src/net.rs
index 0f1cd86..17ea91a 100644
--- a/vhost/src/net.rs
+++ b/vhost/src/net.rs
@@ -14,7 +14,7 @@ use sys_util::{ioctl_with_ref, GuestMemory};
 
 use super::{ioctl_result, Error, Result, Vhost};
 
-static DEVICE: &'static str = "/dev/vhost-net";
+static DEVICE: &str = "/dev/vhost-net";
 
 /// Handle to run VHOST_NET ioctls.
 ///
diff --git a/vhost/src/vsock.rs b/vhost/src/vsock.rs
index 8c96b9f..f453027 100644
--- a/vhost/src/vsock.rs
+++ b/vhost/src/vsock.rs
@@ -12,7 +12,7 @@ use virtio_sys::{VHOST_VSOCK_SET_GUEST_CID, VHOST_VSOCK_SET_RUNNING};
 
 use super::{ioctl_result, Error, Result, Vhost};
 
-static DEVICE: &'static str = "/dev/vhost-vsock";
+static DEVICE: &str = "/dev/vhost-vsock";
 
 /// Handle for running VHOST_VSOCK ioctls.
 pub struct Vsock {