Skip to content

Commit 70a49ca

Browse files
Merge branch 'rust-vmm:main' into main
2 parents 0f2d5ae + 03ba6ea commit 70a49ca

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

vhost-user-backend/src/bitmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl Bitmap for BitmapMmapRegion {
8787
.is_some_and(|bitmap| bitmap.dirty_at(self.base_address.saturating_add(offset)))
8888
}
8989

90-
fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice>::S {
90+
fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice<'_>>::S {
9191
Self {
9292
inner: Arc::clone(&self.inner),
9393
base_address: self.base_address.saturating_add(offset),

vhost-user-backend/src/vring.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub struct VringMutex<M: GuestAddressSpace = GuestMemoryAtomic<GuestMemoryMmap>>
275275

276276
impl<M: GuestAddressSpace> VringMutex<M> {
277277
/// Get a mutable guard to the underlying raw `VringState` object.
278-
fn lock(&self) -> MutexGuard<VringState<M>> {
278+
fn lock(&self) -> MutexGuard<'_, VringState<M>> {
279279
self.state.lock().unwrap()
280280
}
281281
}
@@ -295,11 +295,11 @@ impl<M: 'static + GuestAddressSpace> VringT<M> for VringMutex<M> {
295295
})
296296
}
297297

298-
fn get_ref(&self) -> <Self as VringStateGuard<M>>::G {
298+
fn get_ref(&self) -> <Self as VringStateGuard<'_, M>>::G {
299299
self.state.lock().unwrap()
300300
}
301301

302-
fn get_mut(&self) -> <Self as VringStateMutGuard<M>>::G {
302+
fn get_mut(&self) -> <Self as VringStateMutGuard<'_, M>>::G {
303303
self.lock()
304304
}
305305

@@ -390,7 +390,7 @@ pub struct VringRwLock<M: GuestAddressSpace = GuestMemoryAtomic<GuestMemoryMmap>
390390

391391
impl<M: GuestAddressSpace> VringRwLock<M> {
392392
/// Get a mutable guard to the underlying raw `VringState` object.
393-
fn write_lock(&self) -> RwLockWriteGuard<VringState<M>> {
393+
fn write_lock(&self) -> RwLockWriteGuard<'_, VringState<M>> {
394394
self.state.write().unwrap()
395395
}
396396
}
@@ -410,11 +410,11 @@ impl<M: 'static + GuestAddressSpace> VringT<M> for VringRwLock<M> {
410410
})
411411
}
412412

413-
fn get_ref(&self) -> <Self as VringStateGuard<M>>::G {
413+
fn get_ref(&self) -> <Self as VringStateGuard<'_, M>>::G {
414414
self.state.read().unwrap()
415415
}
416416

417-
fn get_mut(&self) -> <Self as VringStateMutGuard<M>>::G {
417+
fn get_mut(&self) -> <Self as VringStateMutGuard<'_, M>>::G {
418418
self.write_lock()
419419
}
420420

vhost/src/vhost_user/backend_req.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Backend {
9797
}
9898
}
9999

100-
fn node(&self) -> MutexGuard<BackendInternal> {
100+
fn node(&self) -> MutexGuard<'_, BackendInternal> {
101101
self.node.lock().unwrap()
102102
}
103103

vhost/src/vhost_user/gpu_backend_req.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl GpuBackend {
117117
}
118118
}
119119

120-
fn node(&self) -> MutexGuard<BackendInternal> {
120+
fn node(&self) -> MutexGuard<'_, BackendInternal> {
121121
self.node.lock().unwrap()
122122
}
123123

vhost/src/vhost_user/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub enum Error {
9696
/// memfd file creation error
9797
MemFdCreateError,
9898
/// File truncate error
99-
FileTrucateError,
99+
FileTruncateError,
100100
/// memfd file seal errors
101101
MemFdSealError,
102102
}
@@ -126,8 +126,8 @@ impl std::fmt::Display for Error {
126126
Error::MemFdCreateError => {
127127
write!(f, "handler failed to allocate memfd during get_inflight_fd")
128128
}
129-
Error::FileTrucateError => {
130-
write!(f, "handler failed to trucate memfd during get_inflight_fd")
129+
Error::FileTruncateError => {
130+
write!(f, "handler failed to truncate memfd during get_inflight_fd")
131131
}
132132
Error::MemFdSealError => write!(
133133
f,
@@ -161,7 +161,7 @@ impl Error {
161161
Error::SocketError(_) | Error::SocketConnect(_) => false,
162162
Error::FeatureMismatch => false,
163163
Error::ReqHandlerError(_) => false,
164-
Error::MemFdCreateError | Error::FileTrucateError | Error::MemFdSealError => false,
164+
Error::MemFdCreateError | Error::FileTruncateError | Error::MemFdSealError => false,
165165
}
166166
}
167167
}

0 commit comments

Comments
 (0)