diff --git a/tests/by-util/test_w.rs b/tests/by-util/test_w.rs index 90053aed..42341e6c 100644 --- a/tests/by-util/test_w.rs +++ b/tests/by-util/test_w.rs @@ -29,13 +29,13 @@ fn test_output_format() { let output_lines = cmd.stdout_str().lines(); for line in output_lines { - let line_vec: Vec = line.split_whitespace().map(|s| String::from(s)).collect(); + let line_vec: Vec = line.split_whitespace().map(String::from).collect(); // Check the time formatting, this should be the third entry in list // For now, we are just going to check that that length of time is 5 and it has a colon, else // it is possible that a time can look like Fri13, so it can start with a letter and end // with a number assert!( - (line_vec[2].contains(":") && line_vec[2].chars().count() == 5) + (line_vec[2].contains(':') && line_vec[2].chars().count() == 5) || (line_vec[2].starts_with(char::is_alphabetic) && line_vec[2].ends_with(char::is_numeric) && line_vec[2].chars().count() == 5)