Remove NulError

For whatever reason, the 1.8.0 toolchain isn't happy with NulError. It
wasn't necessary anyway.
without.crypto
Dan Burkert 8 years ago
parent 2c43e693e6
commit 76f000df07
  1. 4
      src/environment.rs

@ -1,5 +1,5 @@
use libc::{c_uint, size_t}; use libc::{c_uint, size_t};
use std::ffi::{CString, NulError}; use std::ffi::CString;
#[cfg(unix)] #[cfg(unix)]
use std::os::unix::ffi::OsStrExt; use std::os::unix::ffi::OsStrExt;
#[cfg(windows)] #[cfg(windows)]
@ -209,7 +209,7 @@ impl EnvironmentBuilder {
} }
let path = match CString::new(path.as_os_str().as_bytes()) { let path = match CString::new(path.as_os_str().as_bytes()) {
Ok(path) => path, Ok(path) => path,
Err(NulError { .. }) => return Err(::Error::Invalid), Err(..) => return Err(::Error::Invalid),
}; };
lmdb_try_with_cleanup!(ffi::mdb_env_open(env, path.as_ptr(), self.flags.bits(), mode), lmdb_try_with_cleanup!(ffi::mdb_env_open(env, path.as_ptr(), self.flags.bits(), mode),
ffi::mdb_env_close(env)); ffi::mdb_env_close(env));

Loading…
Cancel
Save