From 36a3a0100f2e6ed66f3ee5afaa223a9d9a5666a1 Mon Sep 17 00:00:00 2001 From: Dan Burkert Date: Mon, 9 Feb 2015 23:52:15 -0800 Subject: [PATCH] update all but tests for rustc 1.0.0-nightly (00df3251f 2015-02-08 23:24:33 +0000) --- lmdb-sys/build.rs | 1 - src/environment.rs | 7 ++++--- src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lmdb-sys/build.rs b/lmdb-sys/build.rs index c88d061..5be0be0 100644 --- a/lmdb-sys/build.rs +++ b/lmdb-sys/build.rs @@ -4,7 +4,6 @@ extern crate "pkg-config" as pkg_config; extern crate gcc; use std::default::Default; -use std::os; use std::env; use std::path::PathBuf; diff --git a/src/environment.rs b/src/environment.rs index 4ac7cfb..14fb468 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -1,7 +1,8 @@ use libc::{c_uint, size_t, mode_t}; -use std::ffi::CString; +use std::ffi::{AsOsStr, CString}; +use std::os::unix::OsStrExt; use std::old_io::FilePermission; -use std::path::BytesContainer; +use std::path::Path; use std::ptr; use std::sync::Mutex; @@ -178,7 +179,7 @@ impl EnvironmentBuilder { ffi::mdb_env_close(env)) } lmdb_try_with_cleanup!(ffi::mdb_env_open(env, - CString::from_slice(path.container_as_bytes()).as_ptr(), + CString::from_slice(path.as_os_str().as_byte_slice()).as_ptr(), self.flags.bits(), mode.bits() as mode_t), ffi::mdb_env_close(env)); diff --git a/src/lib.rs b/src/lib.rs index 6f8637d..051b0e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ //! Provides the minimal amount of abstraction necessary to interact with LMDB safely in Rust. In //! general, the API is very similar to the LMDB [C-API](http://symas.com/mdb/doc/). -#![feature(collections, core, hash, io, libc, optin_builtin_traits, path, std_misc, test, unsafe_destructor)] +#![feature(collections, core, hash, io, libc, optin_builtin_traits, std_misc, test, unsafe_destructor)] #![cfg_attr(test, feature(rand))] extern crate libc;