mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Reduce the scope of the allowed unsafe code in gfx::text.
This commit is contained in:
parent
75ea39c709
commit
db5ddb561c
3 changed files with 3 additions and 1 deletions
|
@ -107,5 +107,4 @@ pub mod paint_thread;
|
||||||
mod platform;
|
mod platform;
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
#[allow(unsafe_code)]
|
|
||||||
pub mod text;
|
pub mod text;
|
||||||
|
|
|
@ -627,6 +627,7 @@ impl<'a> GlyphStore {
|
||||||
/// Used for SIMD.
|
/// Used for SIMD.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||||
|
#[allow(unsafe_code)]
|
||||||
fn transmute_entry_buffer_to_u32_buffer(&self) -> &[u32] {
|
fn transmute_entry_buffer_to_u32_buffer(&self) -> &[u32] {
|
||||||
unsafe { mem::transmute(self.entry_buffer.as_slice()) }
|
unsafe { mem::transmute(self.entry_buffer.as_slice()) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#![allow(unsafe_code)]
|
||||||
|
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use euclid::Point2D;
|
use euclid::Point2D;
|
||||||
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag};
|
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue