mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
misc: Elide needless lifetimes
As clippy of rust-toolchain version 1.83.0-beta.1 suggests, elide needless lifetimes to `'_`. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
86315adb23
commit
0aab960bf1
@ -320,7 +320,7 @@ impl IovecBuffer {
|
||||
|
||||
struct IovecBufferBorrowed<'a>(&'a mut Vec<libc::iovec>);
|
||||
|
||||
impl<'a> std::ops::Deref for IovecBufferBorrowed<'a> {
|
||||
impl std::ops::Deref for IovecBufferBorrowed<'_> {
|
||||
type Target = Vec<libc::iovec>;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@ -328,7 +328,7 @@ impl<'a> std::ops::Deref for IovecBufferBorrowed<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> std::ops::DerefMut for IovecBufferBorrowed<'a> {
|
||||
impl std::ops::DerefMut for IovecBufferBorrowed<'_> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.0
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ pub struct PciBdf(u32);
|
||||
|
||||
struct PciBdfVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for PciBdfVisitor {
|
||||
impl Visitor<'_> for PciBdfVisitor {
|
||||
type Value = PciBdf;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
@ -258,7 +258,7 @@ impl<'a> DBusApi1ProxyBlocking<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> TargetApi<'a> {
|
||||
impl TargetApi<'_> {
|
||||
fn do_command(&mut self, matches: &ArgMatches) -> ApiResult {
|
||||
match self {
|
||||
Self::HttpApi(api_socket, _) => rest_api_do_command(matches, api_socket),
|
||||
|
@ -349,7 +349,7 @@ mod tests {
|
||||
pub guest_evvq: GuestQ<'a>,
|
||||
}
|
||||
|
||||
impl<'a> EpollHandlerContext<'a> {
|
||||
impl EpollHandlerContext<'_> {
|
||||
pub fn signal_txq_event(&mut self) {
|
||||
self.handler.queue_evts[1].write(1).unwrap();
|
||||
let events = epoll::Events::EPOLLIN;
|
||||
|
@ -145,7 +145,7 @@ impl<'a> Iterator for BftIter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for BftIter<'a> {
|
||||
impl DoubleEndedIterator for BftIter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
self.nodes.pop()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user