We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 582846b commit 6a5d3d3Copy full SHA for 6a5d3d3
src/menu.rs
@@ -7,21 +7,22 @@ pub fn add_menu_item(i: u8, t: &str) {
7
let ptr = t.as_ptr() as u32;
8
let len = t.len() as u32;
9
unsafe {
10
- bindings::add_menu_item(i as u32, ptr, len);
+ bindings::add_menu_item(u32::from(i), ptr, len);
11
}
12
13
14
/// Remove a custom menu item with the given index.
15
pub fn remove_menu_item(i: u8) {
16
17
- bindings::remove_menu_item(i as u32);
+ bindings::remove_menu_item(u32::from(i));
18
19
20
21
/// Open the app menu.
22
///
23
/// It will be opened before the next update.
24
/// The current update and then render will proceed as planned.
25
+#[allow(clippy::module_name_repetitions)]
26
pub fn open_menu() {
27
28
bindings::open_menu();
0 commit comments