Use specific assertion for ServoArc

This commit is contained in:
CYBAI 2018-01-25 23:51:08 +08:00
parent 40e40e0f8b
commit f81ba5e9dd

View file

@ -718,7 +718,7 @@ impl<H: 'static, T: 'static> Arc<HeaderSliceWithLength<H, [T]>> {
/// is not modified.
#[inline]
pub fn into_thin(a: Self) -> ThinArc<H, T> {
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<HeaderSliceWithLength<H, [T]>> = 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);
}
}