mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-17 00:43:36 +00:00
dragonball: Fix clippy needless_lifetimes
Fix `needless_lifetimes` clippy warning as suggested by rust 1.85.1. ```console error: the following explicit lifetimes could be elided: 'a --> dbs_virtio_devices/src/vhost/vhost_user/connection.rs:137:6 | 137 | impl<'a, AS: GuestAddressSpace, Q: QueueT, R: GuestMemoryRegion> EndpointParam<'a, AS, Q, R> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `-D clippy::needless-lifetimes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]` help: elide the lifetimes | 137 - impl<'a, AS: GuestAddressSpace, Q: QueueT, R: GuestMemoryRegion> EndpointParam<'a, AS, Q, R> { 137 + impl<AS: GuestAddressSpace, Q: QueueT, R: GuestMemoryRegion> EndpointParam<'_, AS, Q, R> { | ``` Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
c04f1048d5
commit
ceff1ed98d
@ -134,7 +134,7 @@ pub(super) struct EndpointParam<'a, AS: GuestAddressSpace, Q: QueueT, R: GuestMe
|
||||
pub slave_req_fd: Option<RawFd>,
|
||||
}
|
||||
|
||||
impl<'a, AS: GuestAddressSpace, Q: QueueT, R: GuestMemoryRegion> EndpointParam<'a, AS, Q, R> {
|
||||
impl<AS: GuestAddressSpace, Q: QueueT, R: GuestMemoryRegion> EndpointParam<'_, AS, Q, R> {
|
||||
fn get_host_address(&self, addr: GuestAddress, mem: &AS::M) -> VirtioResult<*mut u8> {
|
||||
mem.get_host_address(addr)
|
||||
.map_err(|_| VirtioError::InvalidGuestAddress(addr))
|
||||
|
Loading…
Reference in New Issue
Block a user