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 889f04b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 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
13 changes: 13 additions & 0 deletions crates/3-sdl/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// These linker flags are only necessary with Northfear SDL2 fork
#[link(name = "SDL2", kind = "static")]
#[link(name = "vitaGL", kind = "static")]
#[link(name = "vitashark", kind = "static")]
#[link(name = "SceShaccCg_stub", kind = "static")]
#[link(name = "mathneon", kind = "static")]
#[link(name = "SceShaccCgExt", kind = "static")]
#[link(name = "taihen_stub", kind = "static")]
#[link(name = "SceKernelDmacMgr_stub", kind = "static")]
#[link(name = "SceIme_stub", kind = "static")]
extern "C" {}


use crate::game_of_life::{PLAYGROUND_HEIGHT, PLAYGROUND_WIDTH, SQUARE_SIZE};
use sdl2::keyboard::Keycode;
use sdl2::mouse::MouseButton;
Expand Down
4 changes: 2 additions & 2 deletions crates/4-vitasdk/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::backtrace::Backtrace;
use std::fmt::Write;
use std::panic::{self, PanicInfo};
use std::panic::{self, PanicHookInfo};
use std::thread;
use std::time::Duration;

Expand All @@ -25,7 +25,7 @@ pub fn main() {
thread::sleep(Duration::from_secs(5));
}

fn custom_panic_hook(info: &PanicInfo<'_>) {
fn custom_panic_hook(info: &PanicHookInfo<'_>) {
// The current implementation always returns `Some`.
let location = info.location().unwrap();

Expand Down

0 comments on commit 889f04b

Please sign in to comment.