Skip to content

Commit 77ce015

Browse files
committed
Make expect_that! more hygienic
related #475 I went for using fully qualified method names, rather than `use $crate::GoogleTestSupport as _;` since it's more hygienic. `use $crate::GoogleTestSupport as _;` can cause issues, resulting in a conflict, if the user introduces another method with the same name as one on `GoogleTestSupport`
1 parent fb92909 commit 77ce015

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

googletest/src/assertions.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,8 +1511,7 @@ macro_rules! expect_that {
15111511

15121512
// general case:
15131513
($actual:expr, $expected:expr $(,)?) => {{
1514-
use $crate::GoogleTestSupport as _;
1515-
$crate::verify_that!($actual, $expected).and_log_failure();
1514+
$crate::GoogleTestSupport::and_log_failure($crate::verify_that!($actual, $expected));
15161515
}};
15171516

15181517
// w/ format args, general case:

0 commit comments

Comments
 (0)