From 0168d52fa5a188ae4de65a9ead0d98843ab330fe Mon Sep 17 00:00:00 2001 From: Nikolay Arhipov Date: Mon, 22 Jul 2024 11:26:50 +0300 Subject: [PATCH] try_exists was stabilized as ::exists --- crates/0-std-tests/src/lib.rs | 2 -- crates/0-std-tests/src/tests_fs.rs | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/0-std-tests/src/lib.rs b/crates/0-std-tests/src/lib.rs index dc3b9e2..893f7fd 100644 --- a/crates/0-std-tests/src/lib.rs +++ b/crates/0-std-tests/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(fs_try_exists)] - mod tests_fs; mod tests_pthread; mod tests_tcp; diff --git a/crates/0-std-tests/src/tests_fs.rs b/crates/0-std-tests/src/tests_fs.rs index 3c058d3..9a74a1d 100644 --- a/crates/0-std-tests/src/tests_fs.rs +++ b/crates/0-std-tests/src/tests_fs.rs @@ -6,7 +6,7 @@ mod tests { impl Drop for FsScope { fn drop(&mut self) { - if fs::try_exists("ux0:/data/.rust_test").unwrap_or(false) { + if fs::exists("ux0:/data/.rust_test").unwrap_or(false) { fs::remove_dir_all("ux0:/data/.rust_test").expect("unable to cleanup"); } } @@ -54,7 +54,7 @@ mod tests { assert!(&data == "contents", "invalid file contents"); assert!( - fs::try_exists("ux0:/data/.rust_test/file").unwrap(), + fs::exists("ux0:/data/.rust_test/file").unwrap(), "file does not exist", ); @@ -69,7 +69,7 @@ mod tests { fs::remove_file("ux0:/data/.rust_test/file").expect("unable to delete file"); assert!( - !fs::try_exists("ux0:/data/.rust_test/file").unwrap(), + !fs::exists("ux0:/data/.rust_test/file").unwrap(), "file exists, but should not", );