mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Use variables directly in format! string
Fix clippy warning `uninlined_format_args` reported by rustc rustc
1.89.0 (29483883e 2025-08-04).
```console
warning: variables can be used directly in the `format!` string
--> block/src/lib.rs:649:17
|
649 | info!("{} failed to create io_uring instance: {}", error_msg, e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
649 - info!("{} failed to create io_uring instance: {}", error_msg, e);
649 + info!("{error_msg} failed to create io_uring instance: {e}");
|
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
committed by
cloud-hypervisor-bot
parent
ea83fe314c
commit
f2dfa7f6e0
@@ -152,7 +152,7 @@ impl VhostUserBlkThread {
|
||||
.unwrap();
|
||||
}
|
||||
Err(err) => {
|
||||
error!("failed to parse available descriptor chain: {:?}", err);
|
||||
error!("failed to parse available descriptor chain: {err:?}");
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
@@ -350,7 +350,7 @@ impl VhostUserBackendMut for VhostUserBlkBackend {
|
||||
return Err(Error::HandleEventNotEpollIn.into());
|
||||
}
|
||||
|
||||
debug!("event received: {:?}", device_event);
|
||||
debug!("event received: {device_event:?}");
|
||||
|
||||
let thread = self.threads[thread_id].get_mut().unwrap();
|
||||
match device_event {
|
||||
@@ -531,20 +531,17 @@ pub fn start_block_backend(backend_command: &str) {
|
||||
debug!("blk_daemon is created!\n");
|
||||
|
||||
if let Err(e) = blk_daemon.start(listener) {
|
||||
error!(
|
||||
"Failed to start daemon for vhost-user-block with error: {:?}\n",
|
||||
e
|
||||
);
|
||||
error!("Failed to start daemon for vhost-user-block with error: {e:?}\n");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
if let Err(e) = blk_daemon.wait() {
|
||||
error!("Error from the main thread: {:?}", e);
|
||||
error!("Error from the main thread: {e:?}");
|
||||
}
|
||||
|
||||
for thread in blk_backend.read().unwrap().threads.iter() {
|
||||
if let Err(e) = thread.lock().unwrap().kill_evt.write(1) {
|
||||
error!("Error shutting down worker thread: {:?}", e)
|
||||
error!("Error shutting down worker thread: {e:?}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user