From 2560ccb330ae569b3d8fe83f5328f9a84a529c9b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 16 Mar 2015 11:05:29 -0700 Subject: [PATCH] Remove usage of unstable features in openssl-sys --- openssl-sys/build.rs | 2 -- openssl-sys/src/lib.rs | 1 - openssl-sys/src/probe.rs | 6 +++--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 7b86e782..2c38a320 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -1,5 +1,3 @@ -#![feature(path)] - extern crate "pkg-config" as pkg_config; extern crate gcc; diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 24b79d36..1b404d14 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1,6 +1,5 @@ #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(dead_code)] -#![feature(path, path_ext)] #![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")] extern crate libc; diff --git a/openssl-sys/src/probe.rs b/openssl-sys/src/probe.rs index 8163f97a..bbf769f4 100644 --- a/openssl-sys/src/probe.rs +++ b/openssl-sys/src/probe.rs @@ -1,5 +1,5 @@ use std::env; -use std::fs::PathExt; +use std::fs; use std::path::PathBuf; pub struct ProbeResult { @@ -25,7 +25,7 @@ pub fn find_certs_dirs() -> Vec { "/etc/pki/tls", "/etc/ssl", ].iter().map(|s| PathBuf::new(*s)).filter(|p| { - p.exists() + fs::metadata(p).is_ok() }).collect() } @@ -67,7 +67,7 @@ pub fn probe() -> ProbeResult { } fn try(dst: &mut Option, val: PathBuf) { - if dst.is_none() && val.exists() { + if dst.is_none() && fs::metadata(&val).is_ok() { *dst = Some(val); } }