diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-10-16 13:21:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-08 22:18:17 +0000 |
commit | 0124500a281be85eb4bc671cdfd4fb3bfe3b30fb (patch) | |
tree | 7ab7315bdcd022db494cf4205a178976ff8bd143 /vhost/src | |
parent | 6787ff3f0f7ce9cd5576189dc34ae03cb6ad9421 (diff) | |
download | crosvm-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.rs | 2 | ||||
-rw-r--r-- | vhost/src/vsock.rs | 2 |
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 { |