From 4b08cea663b823c704e51c9e9201dc8c9d1bd9be Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 17 Jul 2015 11:41:06 +0200 Subject: [PATCH] Scope the allowed unsafe code in traversal.rs. --- components/layout/traversal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/layout/traversal.rs b/components/layout/traversal.rs index c366d20206b..c60a01e1629 100644 --- a/components/layout/traversal.rs +++ b/components/layout/traversal.rs @@ -4,8 +4,6 @@ //! Traversals over the DOM and flow trees, running the layout computations. -#![allow(unsafe_code)] - use css::node_style::StyledNode; use css::matching::{ApplicableDeclarations, MatchMethods, StyleSharingResult}; use construct::FlowConstructor; @@ -152,6 +150,7 @@ pub struct RecalcStyleForNode<'a> { impl<'a> PreorderDomTraversal for RecalcStyleForNode<'a> { #[inline] + #[allow(unsafe_code)] fn process(&self, node: LayoutNode) { // Initialize layout data. // @@ -244,6 +243,7 @@ pub struct ConstructFlows<'a> { impl<'a> PostorderDomTraversal for ConstructFlows<'a> { #[inline] + #[allow(unsafe_code)] fn process(&self, node: LayoutNode) { // Construct flows for this node. {