Apply suggestion

This commit is contained in:
Benoît du Garreau 2020-12-09 11:29:42 +01:00
parent 52197d356c
commit f138e260a0
5 changed files with 33 additions and 40 deletions

View file

@ -66,7 +66,7 @@ macro_rules! assert_eq {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
$crate::macros_internals::assert_failed("==", &*left_val, &*right_val);
$crate::macros_internals::assert_failed("==", &*left_val, &*right_val, $crate::option::Option::None);
}
}
}
@ -78,7 +78,7 @@ macro_rules! assert_eq {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
$crate::macros_internals::assert_failed_args("==", &*left_val, &*right_val, $crate::format_args!($($arg)+));
$crate::macros_internals::assert_failed("==", &*left_val, &*right_val, $crate::option::Option::Some($crate::format_args!($($arg)+)));
}
}
}
@ -113,7 +113,7 @@ macro_rules! assert_ne {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
$crate::macros_internals::assert_failed("!=", &*left_val, &*right_val);
$crate::macros_internals::assert_failed("!=", &*left_val, &*right_val, $crate::option::Option::None);
}
}
}
@ -125,7 +125,7 @@ macro_rules! assert_ne {
// The reborrows below are intentional. Without them, the stack slot for the
// borrow is initialized even before the values are compared, leading to a
// noticeable slow down.
$crate::macros_internals::assert_failed_args("!=", &*left_val, &*right_val, $crate::format_args!($($arg)+));
$crate::macros_internals::assert_failed("!=", &*left_val, &*right_val, $crate::option::Option::Some($crate::format_args!($($arg)+)));
}
}
}