mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 12:44:39 +00:00
static-checks: Make cargo clippy pass.
Get rid of cargo clippy warnings. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
parent
9824206820
commit
02d99caf6d
@ -394,7 +394,7 @@ mod tests {
|
|||||||
|
|
||||||
for (i, d) in tests.iter().enumerate() {
|
for (i, d) in tests.iter().enumerate() {
|
||||||
let msg = format!("test[{}]: {:?}", i, d);
|
let msg = format!("test[{}]: {:?}", i, d);
|
||||||
let result = contains_cpu_flag(&d.cpu_flags_vec, d.cpu_flag);
|
let result = contains_cpu_flag(d.cpu_flags_vec, d.cpu_flag);
|
||||||
let msg = format!("{}, result: {:?}", msg, result);
|
let msg = format!("{}, result: {:?}", msg, result);
|
||||||
|
|
||||||
if d.result.is_ok() {
|
if d.result.is_ok() {
|
||||||
|
@ -48,11 +48,11 @@ pub fn check_kernel_cmd_line(
|
|||||||
|
|
||||||
let check_fn = if search_values.is_empty() {
|
let check_fn = if search_values.is_empty() {
|
||||||
|param: &str, search_param: &str, _search_values: &[&str]| {
|
|param: &str, search_param: &str, _search_values: &[&str]| {
|
||||||
return param.eq_ignore_ascii_case(search_param);
|
param.eq_ignore_ascii_case(search_param)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|param: &str, search_param: &str, search_values: &[&str]| {
|
|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 {
|
if split.len() < 2 || split[0] != search_param {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user