clippy fix

This commit is contained in:
Paul Campbell 2023-07-25 19:25:45 +01:00
parent 1fd5df7151
commit b8a3770a1a

View file

@ -7,13 +7,11 @@ pub fn lines_from(file_name: &str) -> Result<Vec<String>> {
let file = File::open(file_name)?;
let reader = BufReader::new(file);
let mut lines = vec![];
for line in reader.lines() {
if let Ok(line) = line {
for line in reader.lines().flatten() {
if line.starts_with('@') {
lines.push(line);
}
}
}
Ok(lines)
}