Add error info for invalid regex.

This commit is contained in:
Csonka Mihaly 2020-03-21 02:52:27 +01:00
parent d371300fac
commit 0785f9cf30

View file

@ -13,7 +13,7 @@ pub const DELIMITER: &str = r" ";
lazy_static! {
pub static ref WIDTHS: (usize, usize) = get_widths();
pub static ref NEWLINE_REGEX: Regex = Regex::new(r"\\\s+").unwrap();
pub static ref NEWLINE_REGEX: Regex = Regex::new(r"\\\s+").expect("Invalid regex");
}
fn get_widths() -> (usize, usize) {