X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-persister%2Fsrc%2Futil.rs;fp=lightning-persister%2Fsrc%2Futil.rs;h=73b28985bfff6ae8b484e5f0d76c62e4091b3541;hb=84909447e9efb9737f6d7bfaecd6f0d863464625;hp=1825980ad891fcb257cdaf956150a526ac5e326d;hpb=0fa18658cdd7d1510f21fd81d29aec233a55c0f8;p=rust-lightning diff --git a/lightning-persister/src/util.rs b/lightning-persister/src/util.rs index 1825980a..73b28985 100644 --- a/lightning-persister/src/util.rs +++ b/lightning-persister/src/util.rs @@ -135,7 +135,7 @@ mod tests { // Create the channel data file and make it a directory. fs::create_dir_all(get_full_filepath(path.clone(), filename.to_string())).unwrap(); match write_to_file(path.clone(), filename.to_string(), &test_writeable) { - Err(e) => assert_eq!(e.kind(), io::ErrorKind::Other), + Err(e) => assert_eq!(e.raw_os_error(), Some(libc::EISDIR)), _ => panic!("Unexpected Ok(())") } fs::remove_dir_all(path).unwrap(); @@ -178,7 +178,7 @@ mod tests { match write_to_file(path, filename, &test_writeable) { Err(e) => { #[cfg(not(target_os = "windows"))] - assert_eq!(e.kind(), io::ErrorKind::Other); + assert_eq!(e.raw_os_error(), Some(libc::EISDIR)); #[cfg(target_os = "windows")] assert_eq!(e.kind(), io::ErrorKind::PermissionDenied); }