mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-06-09 18:55:20 +00:00
Fix `question_mark` clippy warning as suggested by rust 1.85.1.
```console
warning: this `match` expression can be replaced with `?`
--> rustjail/src/cgroups/fs/mod.rs:1327:20
|
1327 | let dev_type = match DeviceType::from_char(d.typ().as_str().chars().next()) {
| ____________________^
1328 | | Some(t) => t,
1329 | | None => return None,
1330 | | };
| |_____^ help: try instead: `DeviceType::from_char(d.typ().as_str().chars().next())?`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>