Skip to content

Commit

Permalink
Merge pull request #291 from schuelermine/fix/prop_assert_ne!
Browse files Browse the repository at this point in the history
Fix prop_assert_ne! requiring import of prop_assert!
  • Loading branch information
rex-remind101 authored Jan 26, 2023
2 parents d382683 + a16853f commit f8eff50
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions proptest/src/sugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,20 +823,20 @@ macro_rules! prop_assert_ne {
($left:expr, $right:expr) => {{
let left = $left;
let right = $right;
prop_assert!(
$crate::prop_assert!(
left != right,
"assertion failed: `(left != right)`\
\n left: `{:?}`,\n right: `{:?}`",
left, right);
left, right);
}};

($left:expr, $right:expr, $fmt:tt $($args:tt)*) => {{
let left = $left;
let right = $right;
prop_assert!(left != right, concat!(
"assertion failed: `(left != right)`\
\n left: `{:?}`,\n right: `{:?}`: ", $fmt),
left, right $($args)*);
$crate::prop_assert!(left != right, concat!(
"assertion failed: `(left != right)`\
\n left: `{:?}`,\n right: `{:?}`: ", $fmt),
left, right $($args)*);
}};
}

Expand Down

0 comments on commit f8eff50

Please sign in to comment.