Auto merge of #11382 - mbrubeck:warnings, r=nox

Fix unused crate warning in script_tests

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11382)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-26 01:43:21 -05:00
commit 97e58e6cfe
7 changed files with 9 additions and 10 deletions

View file

@ -51,7 +51,6 @@ use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::ImageCacheThread; use net_traits::image_cache_thread::ImageCacheThread;
use net_traits::response::HttpsState; use net_traits::response::HttpsState;
use profile_traits::mem; use profile_traits::mem;
use std::any::Any;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::mpsc::{Sender, Receiver}; use std::sync::mpsc::{Sender, Receiver};
use url::Url; use url::Url;

View file

@ -1911,7 +1911,6 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"script 0.0.1", "script 0.0.1",
"url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
] ]
[[package]] [[package]]

View file

@ -30,6 +30,8 @@ serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
smallvec = "0.1" smallvec = "0.1"
url = {version = "1.0.0", features = ["heap_size", "serde"]} url = {version = "1.0.0", features = ["heap_size", "serde"]}
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))'.dependencies]
xdg = "2.0" xdg = "2.0"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]

View file

@ -6,27 +6,27 @@
//! For linux based platforms, it uses the XDG base directory spec but provides //! For linux based platforms, it uses the XDG base directory spec but provides
//! similar abstractions for non-linux platforms. //! similar abstractions for non-linux platforms.
extern crate xdg; #[cfg(any(target_os = "macos", target_os = "windows"))]
use std::env; use std::env;
use std::fs;
use std::path::PathBuf; use std::path::PathBuf;
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
use xdg;
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))] #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
pub fn default_config_dir() -> Option<PathBuf> { pub fn default_config_dir() -> Option<PathBuf> {
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap(); let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
let config_dir = xdg_dirs.get_config_home(); let config_dir = xdg_dirs.get_config_home();
Some(config_dir) Some(config_dir)
} }
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))] #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
pub fn default_data_dir() -> Option<PathBuf> { pub fn default_data_dir() -> Option<PathBuf> {
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap(); let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
let data_dir = xdg_dirs.get_data_home(); let data_dir = xdg_dirs.get_data_home();
Some(data_dir) Some(data_dir)
} }
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))] #[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
pub fn default_cache_dir() -> Option<PathBuf> { pub fn default_cache_dir() -> Option<PathBuf> {
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap(); let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
let cache_dir = xdg_dirs.get_cache_home(); let cache_dir = xdg_dirs.get_cache_home();

View file

@ -38,6 +38,7 @@ extern crate rustc_serialize;
extern crate serde; extern crate serde;
extern crate smallvec; extern crate smallvec;
extern crate url; extern crate url;
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
extern crate xdg; extern crate xdg;
use std::sync::Arc; use std::sync::Arc;

View file

@ -12,5 +12,4 @@ doctest = false
msg = {path = "../../../components/msg"} msg = {path = "../../../components/msg"}
plugins = {path = "../../../components/plugins"} plugins = {path = "../../../components/plugins"}
script = {path = "../../../components/script"} script = {path = "../../../components/script"}
util = {path = "../../../components/util"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -8,7 +8,6 @@
extern crate msg; extern crate msg;
extern crate script; extern crate script;
extern crate url; extern crate url;
extern crate util;
#[cfg(test)] mod origin; #[cfg(test)] mod origin;
#[cfg(all(test, target_pointer_width = "64"))] mod size_of; #[cfg(all(test, target_pointer_width = "64"))] mod size_of;