Skip to content

Commit 2402f55

Browse files
committed
copilot pr feedback
1 parent 7084406 commit 2402f55

File tree

1 file changed

+3
-3
lines changed
  • vm/devices/user_driver/vfio_sys/src

1 file changed

+3
-3
lines changed

vm/devices/user_driver/vfio_sys/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl Group {
213213
) -> anyhow::Result<()> {
214214
// SAFETY: The file descriptor is valid and a correctly constructed struct is being passed.
215215
unsafe {
216-
let id = CString::new(device_id.to_owned())?;
216+
let id = CString::new(device_id)?;
217217
let r = ioctl::vfio_group_set_keep_alive(self.file.as_raw_fd(), id.as_ptr());
218218
match r {
219219
Ok(_) => Ok(()),
@@ -231,12 +231,12 @@ impl Group {
231231
.await;
232232
ioctl::vfio_group_set_keep_alive(self.file.as_raw_fd(), id.as_ptr())
233233
.with_context(|| {
234-
format!("failed to set keepalive after delay for {device_id}")
234+
format!("failed to set keep-alive after delay for {device_id}")
235235
})
236236
.map(|_| ())
237237
}
238238
Err(_) => r
239-
.with_context(|| format!("failed to set keepalive for {device_id}"))
239+
.with_context(|| format!("failed to set keep-alive for {device_id}"))
240240
.map(|_| ()),
241241
}
242242
}

0 commit comments

Comments
 (0)