diff --git a/src/compare/util.rs b/src/compare/util.rs index 4c2578d..ff3c471 100644 --- a/src/compare/util.rs +++ b/src/compare/util.rs @@ -184,11 +184,8 @@ pub(crate) fn get_property<'b, 's, 'x>( .ok_or("Should have an attributes child.")?; let attributes_map = attributes_child.as_map()?; let prop = attributes_map.get(key).map(|token| *token); - match prop - .map(|token| token.as_atom()) - .map_or(Ok(None), |r| r.map(Some))? - { - Some("nil") => return Ok(None), + match prop.map(|token| token.as_atom()) { + Some(Ok("nil")) => return Ok(None), _ => {} }; Ok(prop)