diff --git a/src/metadata/loader.rs b/src/metadata/loader.rs index 1ef9e3c..3ca1001 100644 --- a/src/metadata/loader.rs +++ b/src/metadata/loader.rs @@ -633,9 +633,7 @@ fn text(reader: &mut Reader, name: &[u8]) -> Result(reader: &mut Reader, name: &[u8]) -> Result { let regex_source = text(reader, name)?; // check regular expression syntax - if let Err(err) = regex_syntax::Parser::new().parse(®ex_source) { - return Err(error::LoadMetadata::RegexSyntax(err)); - } + check_regex(®ex_source)?; Ok(regex_source) }