diff --git a/src/edit.rs b/src/edit.rs index 1a2a617ce5cd..d3ddf6a48003 100644 --- a/src/edit.rs +++ b/src/edit.rs @@ -35,7 +35,7 @@ pub fn move_random_line(filename: &str) -> String { .collect::>() .expect("failed to read lines"); - if lines.len() == 0 { + if lines.is_empty() { panic!("Cannot continue the file {} is empty", filename); }