Skip to content

Commit f195c20

Browse files
committed
docstring triple slash
1 parent 11050bd commit f195c20

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

egui/src/input_state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ impl InputState {
192192
self.pointer.wants_repaint() || self.scroll_delta != Vec2::ZERO || !self.events.is_empty()
193193
}
194194

195-
// Ignore a key if it was pressed or released this frame. Useful for hotkeys.
196-
// Returns if the key was pressed this frame
195+
/// Ignore a key if it was pressed or released this frame. Useful for hotkeys.
196+
/// Returns if the key was pressed this frame
197197
pub fn consume_key(&mut self, modifiers: Modifiers, key: Key) -> bool {
198198
self.events.retain(|event| {
199199
!matches!(

egui_demo_lib/src/easy_mark/easy_mark_editor.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,8 @@ fn shortcuts(ui: &Ui, code: &mut dyn TextBuffer, ccursor_range: &mut CCursorRang
127127
(Key::U, "_"), // _underline_
128128
] {
129129
if ui.input_mut().consume_key(
130-
key,
131-
egui::Modifiers {
132-
command: true,
133-
..Default::default()
134-
},
130+
egui::Modifiers::new().command(true),
131+
key
135132
) {
136133
toggle_surrounding(code, ccursor_range, surrounding);
137134
any_change = true;

0 commit comments

Comments
 (0)