Skip to content

Commit

Permalink
try_exists was stabilized as ::exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Jul 22, 2024
1 parent 307c945 commit 0168d52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions crates/0-std-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(fs_try_exists)]

mod tests_fs;
mod tests_pthread;
mod tests_tcp;
Expand Down
6 changes: 3 additions & 3 deletions crates/0-std-tests/src/tests_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down Expand Up @@ -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",
);

Expand All @@ -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",
);

Expand Down

0 comments on commit 0168d52

Please sign in to comment.