From 04aaff55fb329429e6d38caaa26dcb1793b0521c Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Sat, 8 Oct 2022 13:47:18 -0700 Subject: [PATCH 1/3] Run apt-get update before install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 344a534..5293618 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: default: true - name: Install build tools for host - run: sudo apt-get install -y build-essential + run: sudo apt-get update && sudo apt-get install -y build-essential - name: Install cargo-3ds uses: actions-rs/cargo@v1 From 906afaffbafb919e3961517cecf2d402731dafef Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Sat, 8 Oct 2022 13:52:28 -0700 Subject: [PATCH 2/3] Apply some recent clippy lint fixes --- ctru-rs/src/applets/swkbd.rs | 2 +- ctru-rs/src/console.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index c4e8c3e..25ff854 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -90,7 +90,7 @@ impl Swkbd { /// (from 1-3). pub fn init(keyboard_type: Kind, num_buttons: i32) -> Self { unsafe { - let mut state = Box::new(SwkbdState::default()); + let mut state = Box::default(); swkbdInit(state.as_mut(), keyboard_type as u32, num_buttons, -1); Swkbd { state } } diff --git a/ctru-rs/src/console.rs b/ctru-rs/src/console.rs index ddd4fe8..57a9061 100644 --- a/ctru-rs/src/console.rs +++ b/ctru-rs/src/console.rs @@ -17,7 +17,7 @@ impl<'screen> Console<'screen> { /// previously (including other consoles). The new console is automatically selected for /// printing. pub fn init(screen: RefMut<'screen, dyn Screen>) -> Self { - let mut context = Box::new(PrintConsole::default()); + let mut context = Box::default(); unsafe { consoleInit(screen.as_raw(), context.as_mut()) }; From 1e1beaa35b44d7a60f7ae31dfcd676826422d70e Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Sat, 8 Oct 2022 13:56:26 -0700 Subject: [PATCH 3/3] Fix compile error --- ctru-rs/src/applets/swkbd.rs | 2 +- ctru-rs/src/console.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index 25ff854..715c2de 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -90,7 +90,7 @@ impl Swkbd { /// (from 1-3). pub fn init(keyboard_type: Kind, num_buttons: i32) -> Self { unsafe { - let mut state = Box::default(); + let mut state = Box::::default(); swkbdInit(state.as_mut(), keyboard_type as u32, num_buttons, -1); Swkbd { state } } diff --git a/ctru-rs/src/console.rs b/ctru-rs/src/console.rs index 57a9061..cfd15ea 100644 --- a/ctru-rs/src/console.rs +++ b/ctru-rs/src/console.rs @@ -17,7 +17,7 @@ impl<'screen> Console<'screen> { /// previously (including other consoles). The new console is automatically selected for /// printing. pub fn init(screen: RefMut<'screen, dyn Screen>) -> Self { - let mut context = Box::default(); + let mut context = Box::::default(); unsafe { consoleInit(screen.as_raw(), context.as_mut()) };