Make it compile on stable

This commit is contained in:
Ivan Ukhov 2017-08-23 08:06:53 +02:00
parent 24f63fc0c9
commit 1ed353756e

View File

@ -151,10 +151,12 @@ macro_rules! c_str_to_string(
macro_rules! path_to_cstr( macro_rules! path_to_cstr(
($path:expr) => (match $path.to_str() { ($path:expr) => (match $path.to_str() {
Some(path) => match ::std::ffi::CString::new(path) { Some(path) => {
match ::std::ffi::CString::new(path) {
Ok(string) => string, Ok(string) => string,
_ => raise!("failed to process a path"), _ => raise!("failed to process a path"),
} }
}
_ => raise!("failed to process a path"), _ => raise!("failed to process a path"),
}); });
); );