From e983e778eb8f9cb4b6b9382b80d7ba61e620075c Mon Sep 17 00:00:00 2001 From: elvis Date: Mon, 15 Dec 2025 17:00:14 +0100 Subject: [PATCH] cargo fmt --- assert/src/dsl.rs | 3 +-- assert/src/positivedsl.rs | 55 ++++++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/assert/src/dsl.rs b/assert/src/dsl.rs index b588d22..5e36d8d 100644 --- a/assert/src/dsl.rs +++ b/assert/src/dsl.rs @@ -1320,8 +1320,7 @@ where | Range::IterateOverSet(exp) => { let type_exp = typecheck_expression(exp, c)?; match type_exp { - | AssertionTypes::Set => - Ok(AssertionTypes::RangeSet), + | AssertionTypes::Set => Ok(AssertionTypes::RangeSet), | AssertionTypes::RangeNeighbours => Ok(AssertionTypes::RangeNeighbours), | AssertionTypes::RangeContexts => diff --git a/assert/src/positivedsl.rs b/assert/src/positivedsl.rs index e000ffd..9b45711 100644 --- a/assert/src/positivedsl.rs +++ b/assert/src/positivedsl.rs @@ -313,14 +313,17 @@ impl QualifierSystem { } impl QualifierContext { - pub(super) fn get(&self, l: &process::PositiveProcess) -> PositiveAssertReturnValue { + pub(super) fn get( + &self, + l: &process::PositiveProcess, + ) -> PositiveAssertReturnValue { use process::PositiveProcess::*; match self { - | Self::IsNill => PositiveAssertReturnValue::Boolean(matches!(l, Nill)), - | Self::IsIdentifier => - PositiveAssertReturnValue::Boolean(matches!(l, RecursiveIdentifier { - identifier: _, - })), + | Self::IsNill => + PositiveAssertReturnValue::Boolean(matches!(l, Nill)), + | Self::IsIdentifier => PositiveAssertReturnValue::Boolean( + matches!(l, RecursiveIdentifier { identifier: _ }), + ), | Self::IsSet => PositiveAssertReturnValue::Boolean(matches!(l, EntitySet { entities: _, @@ -341,9 +344,11 @@ impl QualifierContext { PositiveAssertReturnValue::Boolean(matches!(l, Summation { children: _, })), - | Self::IsNondeterministicChoice => PositiveAssertReturnValue::Boolean( - matches!(l, NondeterministicChoice { children: _ }), - ), + | Self::IsNondeterministicChoice => + PositiveAssertReturnValue::Boolean(matches!( + l, + NondeterministicChoice { children: _ } + )), | Self::GetSet => PositiveAssertReturnValue::Set( if let EntitySet { @@ -503,7 +508,9 @@ impl PositiveUnary { PositiveAssertionTypes::System, ) => Ok(PositiveAssertionTypes::Context), | ( - Self::Qualifier(PositiveQualifier::Context(QualifierContext::IsNill)), + Self::Qualifier(PositiveQualifier::Context( + QualifierContext::IsNill, + )), PositiveAssertionTypes::Context, ) => Ok(PositiveAssertionTypes::Boolean), | ( @@ -513,7 +520,9 @@ impl PositiveUnary { PositiveAssertionTypes::Context, ) => Ok(PositiveAssertionTypes::Boolean), | ( - Self::Qualifier(PositiveQualifier::Context(QualifierContext::IsSet)), + Self::Qualifier(PositiveQualifier::Context( + QualifierContext::IsSet, + )), PositiveAssertionTypes::Context, ) => Ok(PositiveAssertionTypes::Boolean), | ( @@ -541,7 +550,9 @@ impl PositiveUnary { PositiveAssertionTypes::Context, ) => Ok(PositiveAssertionTypes::Boolean), | ( - Self::Qualifier(PositiveQualifier::Context(QualifierContext::GetSet)), + Self::Qualifier(PositiveQualifier::Context( + QualifierContext::GetSet, + )), PositiveAssertionTypes::Context, ) => Ok(PositiveAssertionTypes::Set), | ( @@ -1596,14 +1607,14 @@ where } => vec![PositiveAssertReturnValue::Context( (*next_process).clone(), )] - .into_iter(), + .into_iter(), | Guarded { reaction: _, next_process, } => vec![PositiveAssertReturnValue::Context( (*next_process).clone(), )] - .into_iter(), + .into_iter(), | WaitEntity { repeat: _, repeated_process, @@ -1611,19 +1622,27 @@ where } => vec![PositiveAssertReturnValue::Context( (*repeated_process).clone(), )] - .into_iter(), + .into_iter(), | Summation { children } => children .iter() - .map(|c| PositiveAssertReturnValue::Context((**c).clone())) + .map(|c| { + PositiveAssertReturnValue::Context( + (**c).clone(), + ) + }) .collect::>() .into_iter(), | NondeterministicChoice { children } => children .iter() - .map(|c| PositiveAssertReturnValue::Context((**c).clone())) + .map(|c| { + PositiveAssertReturnValue::Context( + (**c).clone(), + ) + }) .collect::>() .into_iter(), }) - } + }, | _ => Err(format!("{val:?} is not a set in for cycle.")), } },