Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Meziu committed Jan 2, 2024
1 parent 84b95a9 commit 0c302e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ctru-rs/examples/file-explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl<'a> FileExplorer<'a> {
fn get_input_and_run(&mut self, action: impl FnOnce(&mut Self, String)) {
let mut keyboard = SoftwareKeyboard::default();

match keyboard.get_string(2048) {
match keyboard.get_string(2048, &self.apt, &self.gfx) {

Check warning on line 168 in ctru-rs/examples/file-explorer.rs

View workflow job for this annotation

GitHub Actions / lint (nightly-2023-06-01)

this expression creates a reference which is immediately dereferenced by the compiler

Check warning on line 168 in ctru-rs/examples/file-explorer.rs

View workflow job for this annotation

GitHub Actions / lint (nightly-2023-06-01)

this expression creates a reference which is immediately dereferenced by the compiler
Ok((path, Button::Right)) => {
// Clicked "OK".
action(self, path);
Expand Down
2 changes: 1 addition & 1 deletion ctru-rs/examples/mii-selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
mii_selector.set_title("Great Mii Selector!");

// Launch the Mii Selector and use its result to print the selected Mii's information.
match mii_selector.launch() {
match mii_selector.launch(&apt, &gfx) {
Ok(result) => {
println!("Mii type: {:?}", result.mii_type);
println!("Name: {:?}", result.mii_data.name);
Expand Down
6 changes: 6 additions & 0 deletions ctru-rs/src/applets/swkbd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,12 @@ impl Default for SoftwareKeyboard {
}
}

impl Default for ParentalLock {
fn default() -> Self {
ParentalLock::new()
}
}

impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down

0 comments on commit 0c302e8

Please sign in to comment.