i5-add-tests (part 2) #7

Merged
kemitix merged 10 commits from i5-add-tests into main 2023-07-28 18:35:41 +01:00
Showing only changes of commit b8a3770a1a - Show all commits

View file

@ -7,11 +7,9 @@ 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 {
if line.starts_with('@') {
lines.push(line);
}
for line in reader.lines().flatten() {
if line.starts_with('@') {
lines.push(line);
}
}
Ok(lines)