From 451b8870199843e322be33192e8b431ec1f1ac0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 28 Apr 2020 02:36:38 +0200 Subject: [PATCH] Minor renaming --- src/parse/formulas.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/parse/formulas.rs b/src/parse/formulas.rs index 53012a9..b3d968b 100644 --- a/src/parse/formulas.rs +++ b/src/parse/formulas.rs @@ -352,18 +352,18 @@ impl std::fmt::Debug for Quantifier } // TODO: refactor -fn implication_left_to_right_inner<'i, T>(mut logical_connective_iterator: T, level: usize) +fn implication_left_to_right_inner<'i, T>(mut argument_iterator: T, level: usize) -> Result, crate::parse::Error> where T: std::iter::Iterator> { - match logical_connective_iterator.next() + match argument_iterator.next() { Some(argument) => { // TODO: improve error handling if antecedent cannot be parsed let argument = FormulaStr::new(argument?).parse(level)?; - match implication_left_to_right_inner(logical_connective_iterator, level)? + match implication_left_to_right_inner(argument_iterator, level)? { Some(next_argument) => Ok(Some(crate::Formula::implies( crate::ImplicationDirection::LeftToRight, Box::new(argument), @@ -375,18 +375,18 @@ where } } -fn implication_left_to_right<'i, T>(mut logical_connective_iterator: T, level: usize) +fn implication_left_to_right<'i, T>(mut argument_iterator: T, level: usize) -> Result where T: std::iter::Iterator> { - match logical_connective_iterator.next() + match argument_iterator.next() { Some(argument) => { // TODO: improve error handling if antecedent cannot be parsed let argument = FormulaStr::new(argument?).parse(level)?; - match implication_left_to_right_inner(logical_connective_iterator, level)? + match implication_left_to_right_inner(argument_iterator, level)? { Some(next_argument) => Ok(crate::Formula::implies( crate::ImplicationDirection::LeftToRight, Box::new(argument),