diff --git a/src/gui_handler/gui_handler.rs b/src/gui_handler/gui_handler.rs index ef45a9a..5fc7636 100644 --- a/src/gui_handler/gui_handler.rs +++ b/src/gui_handler/gui_handler.rs @@ -736,44 +736,36 @@ impl GuiHandler { Ok(false) } - pub fn decline_topgui(&self, gui_handler: &mut GuiHandler) -> Result { + pub fn decline_topgui(&mut self) -> Result { // workaround for unwanted borrowing behaviour inside decline function let opt_topgui = self.top_ui.as_ref().cloned(); if let Some(topgui) = opt_topgui { - topgui.decline(gui_handler)?; + topgui.decline(self)?; return Ok(true); } Ok(false) } - pub fn next_tab_topgui( - &self, - gui_handler: &mut GuiHandler, - second_level: bool, - ) -> Result { + pub fn next_tab_topgui(&mut self, second_level: bool) -> Result { // workaround for unwanted borrowing behaviour inside decline function let opt_topgui = self.top_ui.as_ref().cloned(); if let Some(topgui) = opt_topgui { - topgui.next_tab(gui_handler, second_level)?; + topgui.next_tab(self, second_level)?; return Ok(true); } Ok(false) } - pub fn previous_tab_topgui( - &self, - gui_handler: &mut GuiHandler, - second_level: bool, - ) -> Result { + pub fn previous_tab_topgui(&mut self, second_level: bool) -> Result { // workaround for unwanted borrowing behaviour inside decline function let opt_topgui = self.top_ui.as_ref().cloned(); if let Some(topgui) = opt_topgui { - topgui.previous_tab(gui_handler, second_level)?; + topgui.previous_tab(self, second_level)?; return Ok(true); }