mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use specific assertion for ServoArc
This commit is contained in:
parent
40e40e0f8b
commit
f81ba5e9dd
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue