mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-06 18:09:23 +00:00
```
- decoded.strip_prefix("CAP_").unwrap_or(decoded)
+ decoded
+ .strip_prefix("CAP_")
+ .unwrap_or(decoded)
.parse::<oci::Capability>()
.unwrap_or_else(|_| panic!("Failed to parse {:?} to
Enum Capability", cap))
})
@@ -1318,8 +1320,6 @@ mod tests {
#[test]
#[should_panic]
fn test_cap_vec2hashset_bad() {
- cap_vec2hashset(vec![
- "CAP_DOES_NOT_EXIST".to_string(),
- ]);
+ cap_vec2hashset(vec!["CAP_DOES_NOT_EXIST".to_string()]);
```
Signed-off-by: alex.lyn <alex.lyn@antgroup.com>