diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-06-05 12:30:34 +0200 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-06-05 12:31:55 +0200 |
commit | db5ddb561cb821ac89c8cc1002cdbddfd98400fa (patch) | |
tree | 32cfbe0f5b4bc8410679901986f69acc66d27935 | |
parent | 75ea39c7098f2ceec640d62b49b2026c7683021d (diff) | |
download | servo-db5ddb561cb821ac89c8cc1002cdbddfd98400fa.tar.gz servo-db5ddb561cb821ac89c8cc1002cdbddfd98400fa.zip |
Reduce the scope of the allowed unsafe code in gfx::text.
-rw-r--r-- | components/gfx/lib.rs | 1 | ||||
-rw-r--r-- | components/gfx/text/glyph.rs | 1 | ||||
-rw-r--r-- | components/gfx/text/shaping/harfbuzz.rs | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 761799d0ceb..58c92f304d9 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -107,5 +107,4 @@ pub mod paint_thread; mod platform; // Text -#[allow(unsafe_code)] pub mod 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}; |