Skip to content

Commit

Permalink
Use 'alloc' gate only for platforms which use freetype in gfx
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuharuohzeki committed Feb 6, 2017
1 parent fb4f421 commit 550d726
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion components/gfx/lib.rs
Expand Up @@ -6,7 +6,7 @@
#![feature(cfg_target_feature)]
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(heap_api))]

#![feature(alloc)]
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(alloc))]
#![feature(box_syntax)]
#![feature(plugin)]
#![feature(range_contains)]
Expand All @@ -16,6 +16,9 @@

#![deny(unsafe_code)]

#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate alloc;

extern crate app_units;
#[macro_use]
extern crate bitflags;
Expand Down
4 changes: 1 addition & 3 deletions components/gfx/platform/freetype/font_context.rs
Expand Up @@ -2,16 +2,14 @@
* 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/. */

extern crate alloc;

use alloc::heap;
use freetype::freetype::FT_Add_Default_Modules;
use freetype::freetype::FT_Done_Library;
use freetype::freetype::FT_Library;
use freetype::freetype::FT_Memory;
use freetype::freetype::FT_MemoryRec_;
use freetype::freetype::FT_New_Library;
use heapsize::{HeapSizeOf, heap_size_of};
use self::alloc::heap;
use std::os::raw::{c_long, c_void};
use std::ptr;
use std::rc::Rc;
Expand Down

0 comments on commit 550d726

Please sign in to comment.