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 {
Point { x: x_widget, y: y_widget }
);
let view = layout.get_current_view();
if let Some(place) = view.find_button_by_position(point) {
let mut state = place.button.state.clone();
let state = {
let view = layout.get_current_view();
view.find_button_by_position(point)
.map(|place| place.button.state.clone())
};
if let Some(mut state) = state {
layout.press_key(
&VirtualKeyboard(virtual_keyboard),
&mut state,
......@@ -322,7 +326,7 @@ pub mod c {
);
// maybe TODO: draw on the display buffer here
drawing::queue_redraw(ui_keyboard);
}
};
}
// 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