From f69d2801069850b48c6424b50d0107799d56e2f8 Mon Sep 17 00:00:00 2001 From: Guillaume Pasquet Date: Sun, 20 Feb 2022 09:30:46 +0000 Subject: Handle errors (more) gracefully --- src/barbfile.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/barbfile.rs') diff --git a/src/barbfile.rs b/src/barbfile.rs index a039253..1a17796 100644 --- a/src/barbfile.rs +++ b/src/barbfile.rs @@ -158,7 +158,7 @@ impl FromStr for BarbFile { } if let Some(_) = line.find(':') { - headers.push(decode_header(line).unwrap()); + headers.push(decode_header(line).map_err(|_| BarbParseError {})?); } if let None = filter { -- cgit v1.2.3