Return instead of panic on writeln

This commit is contained in:
Kevin Liu 2016-10-30 08:46:53 -07:00
parent e6ba6a5f3b
commit ccdd3d0c00

View file

@ -415,7 +415,7 @@ fn delete_lines_from_record<R: AsRef<Path>>(record: R, graves: &[String])
};
let mut f = fs::File::create(record)?;
for line in lines_to_write {
writeln!(f, "{}", line).unwrap();
writeln!(f, "{}", line)?;
}
Ok(())