From 76f000df0746be0fd4bf9416a16c9ed711359bc2 Mon Sep 17 00:00:00 2001 From: Dan Burkert Date: Sun, 25 Jun 2017 12:16:19 -0700 Subject: [PATCH] Remove NulError For whatever reason, the 1.8.0 toolchain isn't happy with NulError. It wasn't necessary anyway. --- src/environment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/environment.rs b/src/environment.rs index 5962f3a..80251d1 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -1,5 +1,5 @@ use libc::{c_uint, size_t}; -use std::ffi::{CString, NulError}; +use std::ffi::CString; #[cfg(unix)] use std::os::unix::ffi::OsStrExt; #[cfg(windows)] @@ -209,7 +209,7 @@ impl EnvironmentBuilder { } let path = match CString::new(path.as_os_str().as_bytes()) { 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), ffi::mdb_env_close(env));