diff --git a/src/agent/src/device.rs b/src/agent/src/device.rs index 5587e77991..c56663fe0c 100644 --- a/src/agent/src/device.rs +++ b/src/agent/src/device.rs @@ -1563,7 +1563,7 @@ mod tests { // Valid path let device = ccw::Device::from_str(relpath).unwrap(); - let matcher = VirtioBlkCCWMatcher::new(&root_bus, &device); + let matcher = VirtioBlkCCWMatcher::new(root_bus, &device); assert!(matcher.is_match(&uev)); // Invalid paths @@ -1794,12 +1794,7 @@ mod tests { assert!(!matcher.is_match(&uev_remove)); let mut uev_other_device = uev.clone(); - uev_other_device.devpath = format!( - "{}/card{}/{}", - AP_ROOT_BUS_PATH, - card, - format!("{}.0002", card) - ); + uev_other_device.devpath = format!("{}/card{}/{}.0002", AP_ROOT_BUS_PATH, card, card); assert!(!matcher.is_match(&uev_other_device)); } } diff --git a/src/tools/kata-ctl/src/arch/s390x/mod.rs b/src/tools/kata-ctl/src/arch/s390x/mod.rs index 6f3ee1f4ed..9e45922014 100644 --- a/src/tools/kata-ctl/src/arch/s390x/mod.rs +++ b/src/tools/kata-ctl/src/arch/s390x/mod.rs @@ -104,11 +104,11 @@ mod arch_specific { let check_fn = if search_values.is_empty() { |param: &str, search_param: &str, _search_values: &[&str]| { - return param.eq_ignore_ascii_case(search_param); + param.eq_ignore_ascii_case(search_param) } } else { |param: &str, search_param: &str, search_values: &[&str]| { - let split: Vec<&str> = param.splitn(2, "=").collect(); + let split: Vec<&str> = param.splitn(2, '=').collect(); if split.len() < 2 || split[0] != search_param { return false; }