From e74abbd6fe756936dca6f236f472abdaa01e1838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Chud=C3=AD=C4=8Dek?= Date: Sun, 17 Dec 2023 02:39:04 +0100 Subject: [PATCH] style: oh f forgot this --- src/xml_parsing/variable_update_fn_parser.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xml_parsing/variable_update_fn_parser.rs b/src/xml_parsing/variable_update_fn_parser.rs index abc5d3a..e9f4a77 100644 --- a/src/xml_parsing/variable_update_fn_parser.rs +++ b/src/xml_parsing/variable_update_fn_parser.rs @@ -117,11 +117,9 @@ fn process_output_var_name_item, BR: BufRead>( } }); - let item = qualitative_species - .next() - .ok_or(XmlReadingError::NoSuchAttribute( - "value after qualitativeSpecies".to_string(), - ))?; + let item = qualitative_species.next().ok_or_else(|| { + XmlReadingError::NoSuchAttribute("value after qualitativeSpecies".to_string()) + })?; expect_closure_of(xml, "output")?;