aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/traversal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/traversal.rs')
-rw-r--r--components/layout/traversal.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs
index d0123afdcf7..c31d4dcde1a 100644
--- a/components/layout/traversal.rs
+++ b/components/layout/traversal.rs
@@ -4,6 +4,8 @@
//! Traversals over the DOM and flow trees, running the layout computations.
+#![allow(unsafe_blocks)]
+
use css::node_style::StyledNode;
use css::matching::{ApplicableDeclarations, MatchMethods, StyleSharingResult};
use construct::FlowConstructor;
@@ -91,11 +93,9 @@ fn take_task_local_bloom_filter(parent_node: Option<LayoutNode>, layout_context:
fn put_task_local_bloom_filter(bf: Box<BloomFilter>,
unsafe_node: &UnsafeLayoutNode,
layout_context: &LayoutContext) {
- let bf: *mut BloomFilter = unsafe { mem::transmute(bf) };
- STYLE_BLOOM.with(|style_bloom| {
+ STYLE_BLOOM.with(move |style_bloom| {
assert!(style_bloom.borrow().is_none(),
"Putting into a never-taken task-local bloom filter");
- let bf: Box<BloomFilter> = unsafe { mem::transmute(bf) };
*style_bloom.borrow_mut() = Some((bf, *unsafe_node, layout_context.shared.generation));
})
}