diff --git a/src/moz_readability/mod.rs b/src/moz_readability/mod.rs index dc8df9f..c3ab1d2 100644 --- a/src/moz_readability/mod.rs +++ b/src/moz_readability/mod.rs @@ -429,8 +429,7 @@ impl Readability { let mut matches = None; if let Some(property) = node_attr.get("property") { matches = regexes::PROPERTY_REGEX.captures(property); - if matches.is_some() { - let captures = matches.as_ref().unwrap(); + if let Some(captures) = &matches { for capture in captures.iter() { let mut name = capture.unwrap().as_str().to_lowercase(); name = regexes::REPLACE_WHITESPACE_REGEX @@ -564,7 +563,7 @@ impl Readability { .root_node .select_first("title") .map(|title| title.text_contents().trim().to_string()) - .expect("This file has no