refactor: remove unused borrows in menubar.rs

merge-requests/8/head
Nefo Fortressia 2021-10-28 19:19:34 +07:00
parent 6ad708cfc1
commit 5e1de2ec96
1 changed files with 6 additions and 6 deletions

View File

@ -15,15 +15,15 @@ pub trait MenubarImplementedEditor {
impl MenubarImplementedEditor for EchidnaWindow {
fn setup_menubar(&self) {
let app = &self
let app = self
.application()
.expect("&self does not have an application set.");
.expect("self does not have an application set.");
let menubuilder = gtk::Builder::from_string(include_str!("../../../ui/menu.ui"));
let menubar: MenuModel = menubuilder
.object("menu")
.expect("Could not get object 'menu' from builder.");
app.set_menubar(Some(&menubar));
&self.set_show_menubar(true);
self.set_show_menubar(true);
let act_exit: SimpleAction = SimpleAction::new("exit", None);
app.add_action(&act_exit);
@ -86,7 +86,7 @@ impl MenubarImplementedEditor for EchidnaWindow {
let act_window_close = SimpleAction::new("close", None);
&self.add_action(&act_window_close);
self.add_action(&act_window_close);
{
let window = self.clone();
@ -97,9 +97,9 @@ impl MenubarImplementedEditor for EchidnaWindow {
let action_open_file: SimpleAction = SimpleAction::new("open-file", None);
&self.add_action(&action_open_file);
self.add_action(&action_open_file);
action_open_file.connect_activate(clone!(@weak self as window =>
move |action, variant| {
move |_action, _variant| {
window.action_open_file();
}));
}