From b504b6f988a4b76900f26a051ea90a633584cfd1 Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Mon, 24 Jan 2022 18:23:24 -0500 Subject: [PATCH] Address PR comments --- ctru-rs/Cargo.toml | 2 +- ctru-rs/examples/time_rtc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/Cargo.toml b/ctru-rs/Cargo.toml index 036f6e6..3743f07 100644 --- a/ctru-rs/Cargo.toml +++ b/ctru-rs/Cargo.toml @@ -15,6 +15,6 @@ ctru-sys = { path = "../ctru-sys", version = "0.4" } const-zero = "0.1.0" linker-fix-3ds = { git = "https://github.com/Meziu/rust-linker-fix-3ds.git" } pthread-3ds = { git = "https://github.com/Meziu/pthread-3ds.git" } -libc = { version = "0.2" } +libc = "0.2" bitflags = "1.0.0" widestring = "0.2.2" diff --git a/ctru-rs/examples/time_rtc.rs b/ctru-rs/examples/time_rtc.rs index 06a2685..c537069 100644 --- a/ctru-rs/examples/time_rtc.rs +++ b/ctru-rs/examples/time_rtc.rs @@ -86,7 +86,7 @@ fn main() { // Get the current time. ctru_sys bindings should be used rather than // plain libc ones, for reasons I don't understand yet... let unix_time: ctru_sys::time_t = unsafe { ctru_sys::time(std::ptr::null_mut()) }; - let time = unsafe { ptr::read(ctru_sys::gmtime(&unix_time as *const _)) }; + let time = unsafe { *ctru_sys::gmtime(&unix_time as *const _) }; let hours = time.tm_hour; let minutes = time.tm_min;