Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kayagokalp committed Jun 24, 2024
1 parent 5d948d9 commit a1f9308
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ mod tests {
"bad"; "?a" => "?a" if ConditionEqual::new(x.clone(), x)
);
}
// Testing a "generic" language, where the number is not specifically i32,
// but anything that implements some set of traits. For ease of reading
// Testing a "generic" language, where the number is not specifically i32,
// but anything that implements some set of traits. For ease of reading
// these tests set of traits required for language to accept a generic type
// is collected under `SaturationNumber`. The fact that the testing suite
// compiles is testing the macro's parsing implementation.
Expand All @@ -463,17 +463,15 @@ mod tests {

impl From<i32> for CustomNumber {
fn from(value: i32) -> Self {
Self {
num: value
}
Self { num: value }
}
}

pub trait SaturationNumber:
std::fmt::Debug
+ Clone
+ PartialEq
+ std::str::FromStr<Err=String>
+ std::str::FromStr<Err = String>
+ Ord
+ PartialOrd
+ std::hash::Hash
Expand All @@ -495,7 +493,10 @@ mod tests {

#[test]
fn test_generic_lang_display() {
assert_eq!(format!("{}", GenericLang::<CustomNumber>::Add([1.into(), 2.into()])), "+");
assert_eq!(
format!("{}", GenericLang::<CustomNumber>::Add([1.into(), 2.into()])),
"+"
);
}

#[test]
Expand Down

0 comments on commit a1f9308

Please sign in to comment.