Commit b639c7f3 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

Fix old Rust woes

parent d80758fc
Pipeline #49345 passed with stages
in 8 minutes and 46 seconds
...@@ -312,9 +312,13 @@ pub mod c { ...@@ -312,9 +312,13 @@ pub mod c {
Point { x: x_widget, y: y_widget } Point { x: x_widget, y: y_widget }
); );
let view = layout.get_current_view(); let state = {
if let Some(place) = view.find_button_by_position(point) { let view = layout.get_current_view();
let mut state = place.button.state.clone(); view.find_button_by_position(point)
.map(|place| place.button.state.clone())
};
if let Some(mut state) = state {
layout.press_key( layout.press_key(
&VirtualKeyboard(virtual_keyboard), &VirtualKeyboard(virtual_keyboard),
&mut state, &mut state,
...@@ -322,7 +326,7 @@ pub mod c { ...@@ -322,7 +326,7 @@ pub mod c {
); );
// maybe TODO: draw on the display buffer here // maybe TODO: draw on the display buffer here
drawing::queue_redraw(ui_keyboard); drawing::queue_redraw(ui_keyboard);
} };
} }
// FIXME: this will work funny // FIXME: this will work funny
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment