diff options
| author | Steven Fackler <[email protected]> | 2015-03-16 11:29:00 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-03-16 11:29:00 -0700 |
| commit | 5adbe4b3627e725ebbd8324549c78c8ab2882e06 (patch) | |
| tree | a1674126c8feb170244cafe68b8625797e263e5d | |
| parent | Fix warnings (diff) | |
| parent | Remove usage of unstable features in openssl-sys (diff) | |
| download | rust-openssl-5adbe4b3627e725ebbd8324549c78c8ab2882e06.tar.xz rust-openssl-5adbe4b3627e725ebbd8324549c78c8ab2882e06.zip | |
Merge pull request #184 from alexcrichton/update
Remove usage of unstable features in openssl-sys
| -rw-r--r-- | openssl-sys/build.rs | 2 | ||||
| -rw-r--r-- | openssl-sys/src/lib.rs | 1 | ||||
| -rw-r--r-- | 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<PathBuf> { "/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<PathBuf>, val: PathBuf) { - if dst.is_none() && val.exists() { + if dst.is_none() && fs::metadata(&val).is_ok() { *dst = Some(val); } } |