From f81ba5e9dd92e81b62becdb9cc1d0743d03ae0eb Mon Sep 17 00:00:00 2001 From: CYBAI Date: Thu, 25 Jan 2018 23:51:08 +0800 Subject: [PATCH] Use specific assertion for ServoArc --- components/servo_arc/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index 1301a8e6611..600085fd244 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -718,7 +718,7 @@ impl Arc> { /// is not modified. #[inline] pub fn into_thin(a: Self) -> ThinArc { - assert!(a.header.length == a.slice.len(), + assert_eq!(a.header.length, a.slice.len(), "Length needs to be correct for ThinArc to work"); let fat_ptr: *mut ArcInner> = a.ptr(); mem::forget(a); @@ -987,6 +987,6 @@ mod tests { let _ = x == x; Arc::from_thin(x.clone()); } - assert!(canary.load(Acquire) == 1); + assert_eq!(canary.load(Acquire), 1); } }