Skip to content

Commit

Permalink
Update to rust master
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Mar 25, 2015
1 parent f664444 commit 5a80cc8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions openssl-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
extern crate "pkg-config" as pkg_config;
#![feature(convert)]

extern crate pkg_config;
extern crate gcc;

use std::env;
Expand Down Expand Up @@ -36,7 +38,7 @@ fn main() {
let mut include_dirs = vec![];

if let Some(include_dir) = include_dir {
include_dirs.push(PathBuf::new(&include_dir));
include_dirs.push(PathBuf::from(&include_dir));
}

build_old_openssl_shim(&include_dirs);
Expand Down
3 changes: 2 additions & 1 deletion openssl-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(dead_code)]
#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")]
#![feature(convert)]

extern crate libc;

#[cfg(target_os = "nacl")]
extern crate "libressl-pnacl-sys" as _for_linkage;
extern crate libressl_pnacl_sys;

use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t};
use std::mem;
Expand Down
6 changes: 3 additions & 3 deletions openssl-sys/src/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn find_certs_dirs() -> Vec<PathBuf> {
"/etc/openssl",
"/etc/pki/tls",
"/etc/ssl",
].iter().map(|s| PathBuf::new(*s)).filter(|p| {
].iter().map(|s| PathBuf::from(*s)).filter(|p| {
fs::metadata(p).is_ok()
}).collect()
}
Expand All @@ -51,8 +51,8 @@ pub fn init_ssl_cert_env_vars() {

pub fn probe() -> ProbeResult {
let mut result = ProbeResult {
cert_file: env::var_os("SSL_CERT_FILE").map(|s| PathBuf::new(&s)),
cert_dir: env::var_os("SSL_CERT_DIR").map(|s| PathBuf::new(&s)),
cert_file: env::var_os("SSL_CERT_FILE").map(PathBuf::from),
cert_dir: env::var_os("SSL_CERT_DIR").map(PathBuf::from),
};
for certs_dir in find_certs_dirs().iter() {
// cert.pem looks to be an openssl 1.0.1 thing, while
Expand Down
4 changes: 2 additions & 2 deletions openssl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ extern crate bitflags;

extern crate libc;
#[cfg(test)]
extern crate "rustc-serialize" as serialize;
extern crate rustc_serialize as serialize;

extern crate "openssl-sys" as ffi;
extern crate openssl_sys as ffi;

mod macros;

Expand Down

0 comments on commit 5a80cc8

Please sign in to comment.