Skip to content

Commit 6a5d3d3

Browse files
committed
fix clippy warnings
1 parent 582846b commit 6a5d3d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/menu.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ pub fn add_menu_item(i: u8, t: &str) {
77
let ptr = t.as_ptr() as u32;
88
let len = t.len() as u32;
99
unsafe {
10-
bindings::add_menu_item(i as u32, ptr, len);
10+
bindings::add_menu_item(u32::from(i), ptr, len);
1111
}
1212
}
1313

1414
/// Remove a custom menu item with the given index.
1515
pub fn remove_menu_item(i: u8) {
1616
unsafe {
17-
bindings::remove_menu_item(i as u32);
17+
bindings::remove_menu_item(u32::from(i));
1818
}
1919
}
2020

2121
/// Open the app menu.
2222
///
2323
/// It will be opened before the next update.
2424
/// The current update and then render will proceed as planned.
25+
#[allow(clippy::module_name_repetitions)]
2526
pub fn open_menu() {
2627
unsafe {
2728
bindings::open_menu();

0 commit comments

Comments
 (0)