Skip to content

Commit

Permalink
Clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX committed Jul 1, 2024
1 parent 365d02f commit 6b6b7d6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions egui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ fn search_ui(
response.surrender_focus();
}
if ui.input(|input| input.key_pressed(Key::Slash)) {
ui.memory_mut(|mem| mem.close_popup());
ui.memory_mut(egui::Memory::close_popup);
response.request_focus();
}

Expand Down Expand Up @@ -654,7 +654,7 @@ fn main_ui(

if ui.input(|input| input.modifiers.ctrl && input.key_pressed(Key::R)) {
*state = UiState::default();
ui.memory_mut(|mem| mem.close_popup());
ui.memory_mut(egui::Memory::close_popup);
refresh();
}
if !active_entries(entries, state).is_empty() && ui.memory(|mem| !mem.any_popup_open()) {
Expand All @@ -668,10 +668,8 @@ fn main_ui(
});
}

let mut try_popup = false;
if ui.input(|input| input.key_pressed(Key::Space)) && ui.memory(|mem| mem.focused().is_none()) {
try_popup = true;
}
let try_popup =
ui.input(|input| input.key_pressed(Key::Space)) && ui.memory(|mem| mem.focused().is_none());

// TODO implement paste (by pressing enter or ctrl+N)
ScrollArea::vertical().show(ui, |ui| {
Expand Down

0 comments on commit 6b6b7d6

Please sign in to comment.