Skip to content

Commit e67b44a

Browse files
committed
Fix warnings
1 parent 031f349 commit e67b44a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

egui/src/context_menu.rs

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ pub struct SubMenu {
172172
text: String,
173173
}
174174
impl SubMenu {
175+
#[allow(clippy::needless_pass_by_value)]
175176
pub fn new(text: impl ToString) -> Self {
176177
Self {
177178
text: text.to_string(),

egui/src/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl Response {
453453
}
454454

455455
pub fn context_menu(&self, add_contents: impl FnOnce(&mut Ui, &mut super::context_menu::MenuState)) -> &Self {
456-
self.ctx.show_context_menu(&self, add_contents);
456+
self.ctx.show_context_menu(self, add_contents);
457457
self
458458
}
459459
}

0 commit comments

Comments
 (0)