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:
Archana Shinde 2023-07-13 18:42:59 +05:30
parent 9824206820
commit 02d99caf6d
2 changed files with 3 additions and 3 deletions

View File

@ -394,7 +394,7 @@ mod tests {
for (i, d) in tests.iter().enumerate() {
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);
if d.result.is_ok() {

View File

@ -48,11 +48,11 @@ pub fn check_kernel_cmd_line(
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;
}