diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/floats.rs | 4 | ||||
-rw-r--r-- | components/layout/layout_debug.rs | 2 | ||||
-rw-r--r-- | components/layout/multicol.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/floats.rs b/components/layout/floats.rs index 4c4d6f21f36..58fe1bc59b8 100644 --- a/components/layout/floats.rs +++ b/components/layout/floats.rs @@ -364,8 +364,8 @@ impl Floats { } } Some(rect) => { - assert!(rect.start.b + rect.size.block != float_b, - "Non-terminating float placement"); + assert_ne!(rect.start.b + rect.size.block, float_b, + "Non-terminating float placement"); // Place here if there is enough room if rect.size.inline >= info.size.inline { diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs index 466399ca8f0..26fd4fb3e3f 100644 --- a/components/layout/layout_debug.rs +++ b/components/layout/layout_debug.rs @@ -114,7 +114,7 @@ pub fn begin_trace(flow_root: FlowRef) { /// file can then be viewed with an external tool. pub fn end_trace(generation: u32) { let mut thread_state = STATE_KEY.with(|ref r| r.borrow_mut().take().unwrap()); - assert!(thread_state.scope_stack.len() == 1); + assert_eq!(thread_state.scope_stack.len(), 1); let mut root_scope = thread_state.scope_stack.pop().unwrap(); root_scope.post = to_value(&thread_state.flow_root.base()).unwrap(); diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs index 8851fb1836c..f7da86f85a1 100644 --- a/components/layout/multicol.rs +++ b/components/layout/multicol.rs @@ -159,7 +159,7 @@ impl Flow for MulticolFlow { }); // Before layout, everything is in a single "column" - assert!(self.block_flow.base.children.len() == 1); + assert_eq!(self.block_flow.base.children.len(), 1); let mut column = self.block_flow.base.children.pop_front_arc().unwrap(); // Pretend there is no children for this: |