Skip to content

Commit

Permalink
fix: Fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: rhysd <[email protected]>
  • Loading branch information
rhysd committed Oct 17, 2023
1 parent 3672a0c commit c228e5a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/platform_impl/gtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,13 @@ impl MenuChild {
self.gtk_menu_items
.borrow_mut()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push(item.clone());
self.gtk_menus
.as_mut()
.unwrap()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push((id, submenu.clone()));
}

Expand Down Expand Up @@ -1066,7 +1066,7 @@ impl MenuChild {
self.gtk_menu_items
.borrow_mut()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push(item.clone());
}

Expand Down Expand Up @@ -1186,7 +1186,7 @@ impl MenuChild {
self.gtk_menu_items
.borrow_mut()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push(item.clone());
}
Ok(item)
Expand Down Expand Up @@ -1242,7 +1242,7 @@ impl MenuChild {
self.gtk_menu_items
.borrow_mut()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push(item.clone());
}

Expand All @@ -1259,7 +1259,7 @@ impl MenuChild {
.icon
.as_ref()
.map(|i| gtk::Image::from_pixbuf(Some(&i.inner.to_pixbuf_scale(16, 16))))
.unwrap_or_else(gtk::Image::default);
.unwrap_or_default();

self.accel_group = accel_group.cloned();

Expand Down Expand Up @@ -1299,7 +1299,7 @@ impl MenuChild {
self.gtk_menu_items
.borrow_mut()
.entry(menu_id)
.or_insert_with(Vec::new)
.or_default()
.push(item.clone());
}

Expand Down

0 comments on commit c228e5a

Please sign in to comment.