Skip to content

Commit

Permalink
Fix Clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed May 17, 2024
1 parent 87d535f commit 1314634
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ extern "C" fn sample_main() {
match evt {
ledger_device_sdk::buttons::ButtonEvent::BothButtonsRelease => {
let pl = menu.pagelinks[page_index];
match pl.link {
Some(m) => {
menu = m;
page_index = 0;
}
None => (),
if let Some(m) = pl.link {
menu = m;
page_index = 0;
}
}
ledger_device_sdk::buttons::ButtonEvent::LeftButtonRelease => {
Expand All @@ -64,7 +61,7 @@ extern "C" fn sample_main() {
}
_ => (),
}
if menu.pagelinks.len() == 0 {
if menu.pagelinks.is_empty() {
// In the HELL menu
ledger_device_sdk::exit_app(0);
}
Expand Down

0 comments on commit 1314634

Please sign in to comment.