diff options
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index e6bf124230b..66ee466d450 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -771,9 +771,8 @@ pub struct AbsoluteDescendantIter<'a> { impl<'a> Iterator for AbsoluteDescendantIter<'a> { type Item = &'a mut Flow; - #[allow(unsafe_code)] fn next(&mut self) -> Option<&'a mut Flow> { - self.iter.next().map(|info| unsafe { flow_ref::deref_mut(&mut info.flow) }) + self.iter.next().map(|info| flow_ref::deref_mut(&mut info.flow)) } } @@ -1353,10 +1352,9 @@ impl MutableOwnedFlowUtils for FlowRef { /// This is called during flow construction, so nothing else can be accessing the descendant /// flows. This is enforced by the fact that we have a mutable `FlowRef`, which only flow /// construction is allowed to possess. - #[allow(unsafe_code)] fn set_absolute_descendants(&mut self, abs_descendants: AbsoluteDescendants) { let this = self.clone(); - let base = mut_base(unsafe { flow_ref::deref_mut(self) }); + let base = mut_base(flow_ref::deref_mut(self)); base.abs_descendants = abs_descendants; for descendant_link in base.abs_descendants.iter() { let descendant_base = mut_base(descendant_link); |