From db5ddb561cb821ac89c8cc1002cdbddfd98400fa Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sun, 5 Jun 2016 12:30:34 +0200 Subject: Reduce the scope of the allowed unsafe code in gfx::text. --- components/gfx/text/glyph.rs | 1 + components/gfx/text/shaping/harfbuzz.rs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'components/gfx/text') diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index a41202eb3a2..fe9dc415625 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -627,6 +627,7 @@ impl<'a> GlyphStore { /// Used for SIMD. #[inline] #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] + #[allow(unsafe_code)] fn transmute_entry_buffer_to_u32_buffer(&self) -> &[u32] { unsafe { mem::transmute(self.entry_buffer.as_slice()) } } diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 5e6b025e21c..5106418be61 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#![allow(unsafe_code)] + use app_units::Au; use euclid::Point2D; use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag}; -- cgit v1.2.3