mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2026-01-04 08:17:15 +00:00
clippy: Fix clippy::question_mark
Fix `clippy::question_mark` warnings reported by clippy 0.1.85
(4d91de4e48 2025-02-17).
```console
error: this `match` expression can be replaced with `?`
--> vhost-device-can/src/main.rs:77:27
|
77 | let can_devices = match parse_can_devices(&args) {
| ___________________________^
78 | | Ok(can_devs) => can_devs,
79 | | Err(e) => return Err(e),
80 | | };
| |_________^ help: try instead: `parse_can_devices(&args)?`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `-D clippy::question-mark` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
d43fd79bb7
commit
e4c5eb90e7
@ -74,10 +74,7 @@ impl TryFrom<CanArgs> for VuCanConfig {
|
||||
return Err(Self::Error::SocketCountInvalid(0));
|
||||
}
|
||||
|
||||
let can_devices = match parse_can_devices(&args) {
|
||||
Ok(can_devs) => can_devs,
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
let can_devices = parse_can_devices(&args)?;
|
||||
|
||||
Ok(VuCanConfig {
|
||||
socket_path: args.socket_path,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user