diff options
-rw-r--r-- | components/style/build_gecko.rs | 21 | ||||
-rw-r--r-- | ports/cef/lib.rs | 1 | ||||
-rw-r--r-- | tests/unit/gfx/font_cache_thread.rs | 2 | ||||
-rw-r--r-- | tests/unit/style/properties/serialization.rs | 2 |
4 files changed, 12 insertions, 14 deletions
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index d947323ced7..f9e8da7c49e 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -4,15 +4,10 @@ mod common { use std::env; - use std::path::{Path, PathBuf}; - use std::sync::Mutex; - use std::time::SystemTime; + use std::path::PathBuf; lazy_static! { pub static ref OUTDIR_PATH: PathBuf = PathBuf::from(env::var("OUT_DIR").unwrap()).join("gecko"); - pub static ref LAST_MODIFIED: Mutex<SystemTime> = - Mutex::new(get_modified_time(&env::current_exe().unwrap()) - .expect("Failed to get modified time of executable")); } pub const STRUCTS_DEBUG_FILE: &'static str = "structs_debug.rs"; @@ -31,10 +26,6 @@ mod common { BuildType::Release => STRUCTS_RELEASE_FILE } } - - pub fn get_modified_time(file: &Path) -> Option<SystemTime> { - file.metadata().and_then(|m| m.modified()).ok() - } } #[cfg(feature = "bindgen")] @@ -46,8 +37,9 @@ mod bindings { use std::env; use std::fs::File; use std::io::{Read, Write}; - use std::path::PathBuf; + use std::path::{Path, PathBuf}; use std::sync::Mutex; + use std::time::SystemTime; use super::common::*; lazy_static! { @@ -64,6 +56,13 @@ mod bindings { DISTDIR_PATH.join("include/nspr"), ]; static ref ADDED_PATHS: Mutex<HashSet<PathBuf>> = Mutex::new(HashSet::new()); + pub static ref LAST_MODIFIED: Mutex<SystemTime> = + Mutex::new(get_modified_time(&env::current_exe().unwrap()) + .expect("Failed to get modified time of executable")); + } + + fn get_modified_time(file: &Path) -> Option<SystemTime> { + file.metadata().and_then(|m| m.modified()).ok() } fn search_include(name: &str) -> Option<PathBuf> { diff --git a/ports/cef/lib.rs b/ports/cef/lib.rs index 69f3471cdab..f627c85f2b1 100644 --- a/ports/cef/lib.rs +++ b/ports/cef/lib.rs @@ -41,7 +41,6 @@ extern crate cocoa; #[cfg(target_os="macos")] #[macro_use] extern crate objc; -#[cfg(target_os="linux")] extern crate x11; // Must come first. pub mod macros; diff --git a/tests/unit/gfx/font_cache_thread.rs b/tests/unit/gfx/font_cache_thread.rs index 3161199c7dd..dc192090ae1 100644 --- a/tests/unit/gfx/font_cache_thread.rs +++ b/tests/unit/gfx/font_cache_thread.rs @@ -4,7 +4,7 @@ use gfx::font_cache_thread::FontCacheThread; use ipc_channel::ipc; -use style::computed_values::font_family::{FontFamily, FamilyName}; +use style::computed_values::font_family::FamilyName; use style::font_face::{FontFaceRule, Source}; #[test] diff --git a/tests/unit/style/properties/serialization.rs b/tests/unit/style/properties/serialization.rs index d1826cc4248..5c5061b1f04 100644 --- a/tests/unit/style/properties/serialization.rs +++ b/tests/unit/style/properties/serialization.rs @@ -884,7 +884,7 @@ mod shorthand_serialization { use style::properties::longhands::mask_repeat as repeat; use style::properties::longhands::mask_size as size; use style::values::specified::Image; - use style::values::specified::position::{HorizontalPosition, Position, VerticalPosition}; + use style::values::specified::position::{HorizontalPosition, VerticalPosition}; use super::*; macro_rules! single_vec_value_typedef { |