diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e39f589..d5e8ced 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ use std::path::PathBuf; use std::result::Result; use std::fs::File; +use std::error::Error; fn parse_filepath(str: &OsStr) -> Result<PathBuf, OsString> { let path: PathBuf = ::std::convert::From::from(str); @@ -49,7 +50,8 @@ fn main() -> Result<(), Box<Error>> { for line_result in lines { let line = line_result?; if line == String::from("^") { - qif_file.push(QifEntry::new(&next_entry)); + let new_qif_entry = QifEntry::new(&next_entry)?; + qif_file.push(new_qif_entry); next_entry.clear(); } else { next_entry.push(line); |