From 777e13c534af4fd5a64e8bc04a70a2c0f6c87ba4 Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Thu, 26 Dec 2024 21:21:01 +0900 Subject: [PATCH] chore(linter): use `assert_eq!` instead of `assert!` (#8124) This ensures that both the expected and actual values are printed in the log when the test fails. --- crates/oxc_linter/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/lib.rs b/crates/oxc_linter/src/lib.rs index ffcf7a3bf..ec5a500ee 100644 --- a/crates/oxc_linter/src/lib.rs +++ b/crates/oxc_linter/src/lib.rs @@ -57,7 +57,7 @@ fn size_asserts() { // `RuleEnum` runs in a really tight loop, make sure it is small for CPU cache. // A reduction from 168 bytes to 16 results 15% performance improvement. // See codspeed in https://github.com/oxc-project/oxc/pull/1783 - assert!(std::mem::size_of::() == 16); + assert_eq!(size_of::(), 16); } #[derive(Debug)]