From 56af6a65680056d3d7da7ab255fe38b35563b8de Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 25 Mar 2015 16:54:34 +0100 Subject: [PATCH] Fix warnings related to std::fs::PathExt on Android. --- components/util/lib.rs | 2 +- components/util/resource_files.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/util/lib.rs b/components/util/lib.rs index c9b1c5bb76a..b4fa2b7a5b0 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -13,7 +13,7 @@ #![feature(old_io)] #![feature(optin_builtin_traits)] #![feature(path)] -#![feature(path_ext)] +#![cfg_attr(not(target_os = "android"), feature(path_ext))] #![feature(plugin)] #![feature(rustc_private)] #![feature(std_misc)] diff --git a/components/util/resource_files.rs b/components/util/resource_files.rs index 47967981a61..f614673946f 100644 --- a/components/util/resource_files.rs +++ b/components/util/resource_files.rs @@ -2,7 +2,7 @@ * 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/. */ -use std::fs::{File, PathExt}; +use std::fs::File; use std::io::{self, Read}; use std::path::PathBuf; @@ -15,6 +15,7 @@ pub fn resources_dir_path() -> PathBuf { pub fn resources_dir_path() -> PathBuf { use opts; use std::env; + use std::fs::PathExt; match opts::get().resources_path { Some(ref path) => PathBuf::new(path),