aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r--components/layout/flow.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 20645e70123..c7ce0275ef6 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -657,15 +657,7 @@ pub struct DescendantIter<'a> {
impl<'a> Iterator<&'a mut Flow + 'a> for DescendantIter<'a> {
fn next(&mut self) -> Option<&'a mut Flow + 'a> {
- match self.iter.next() {
- None => None,
- Some(ref mut flow) => {
- unsafe {
- let result: &'a mut Flow = mem::transmute(flow.deref_mut());
- Some(result)
- }
- }
- }
+ self.iter.next().map(|flow| &mut **flow)
}
}