Removed include!

This commit is contained in:
elvis
2025-08-17 01:31:41 +02:00
parent c27610877d
commit 397cf20008
3 changed files with 14 additions and 12 deletions

View File

@ -133,7 +133,7 @@ pub enum Binary {
} }
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]
enum AssertionTypes { pub(super) enum AssertionTypes {
Boolean, Boolean,
Integer, Integer,
String, String,
@ -246,7 +246,7 @@ impl QualifierSystem {
} }
impl Unary { impl Unary {
fn is_prefix(&self) -> bool { pub(super) fn is_prefix(&self) -> bool {
match self { match self {
Self::Not | Self::Not |
Self::Rand => true, Self::Rand => true,
@ -262,11 +262,11 @@ impl Unary {
} }
} }
fn is_suffix(&self) -> bool { pub(super) fn is_suffix(&self) -> bool {
!self.is_prefix() !self.is_prefix()
} }
fn associate( pub(super) fn associate(
&self, &self,
type_exp: &AssertionTypes type_exp: &AssertionTypes
) -> Result<AssertionTypes, String> { ) -> Result<AssertionTypes, String> {
@ -330,7 +330,7 @@ impl Unary {
} }
impl Binary { impl Binary {
fn is_prefix(&self) -> bool { pub(super) fn is_prefix(&self) -> bool {
match self { match self {
Self::And | Self::And |
Self::Or | Self::Or |
@ -355,11 +355,11 @@ impl Binary {
} }
} }
fn is_suffix(&self) -> bool { pub(super) fn is_suffix(&self) -> bool {
false false
} }
fn is_infix(&self) -> bool { pub(super) fn is_infix(&self) -> bool {
match self { match self {
Self::And | Self::And |
Self::Or | Self::Or |
@ -384,7 +384,7 @@ impl Binary {
} }
} }
fn associate( pub(super) fn associate(
&self, &self,
t1: &AssertionTypes, t1: &AssertionTypes,
t2: &AssertionTypes t2: &AssertionTypes
@ -469,8 +469,9 @@ impl Binary {
} }
impl AssertReturnValue { impl AssertReturnValue {
pub fn assign_qualified(&mut self, q: Qualifier, val: AssertReturnValue) pub(super) fn assign_qualified(
-> Result<(), String> { &mut self, q: Qualifier, val: AssertReturnValue
) -> Result<(), String> {
match (self, q, val) { match (self, q, val) {
(Self::Label(l), (Self::Label(l),
Qualifier::Restricted(q), Qualifier::Restricted(q),
@ -1244,5 +1245,3 @@ impl RSassert<EdgeRelablerInput> {
} }
} }
} }
include!("fmt.rs");

View File

@ -2,6 +2,7 @@
// Display Implementation for all types // Display Implementation for all types
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
use std::fmt; use std::fmt;
use super::dsl::*;
impl<S> fmt::Display for RSassert<S> where S: fmt::Display { impl<S> fmt::Display for RSassert<S> where S: fmt::Display {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

View File

@ -1,4 +1,6 @@
pub mod dsl; pub mod dsl;
mod fmt;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;