From b8a3770a1aebeac24e2cedb95db8db5cb918fd0a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 25 Jul 2023 19:25:45 +0100 Subject: [PATCH] clippy fix --- src/subscriptions.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/subscriptions.rs b/src/subscriptions.rs index 5e5a955..17ebde7 100644 --- a/src/subscriptions.rs +++ b/src/subscriptions.rs @@ -7,11 +7,9 @@ pub fn lines_from(file_name: &str) -> Result> { 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)