fix(fn signature): remove return types from function signatures

This commit is contained in:
doryan 2024-07-22 00:24:09 +04:00
parent 2e543a22c8
commit 54a4b44780
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
use gtk::*; use gtk::*;
use gtk4 as gtk; use gtk4 as gtk;
pub fn state_controller(switch: &Switch, label: &Label) -> () { pub fn state_controller(switch: &Switch, label: &Label) {
if switch.state() { if switch.state() {
label.set_label("Режим: проверка"); label.set_label("Режим: проверка");
} else { } else {

View File

@ -13,7 +13,7 @@ where
} }
pub trait BtnEventHandler { pub trait BtnEventHandler {
fn on_click(self) -> (); fn on_click(self);
} }
impl<F, C> BtnEventHandler for EventHandler<F, C> impl<F, C> BtnEventHandler for EventHandler<F, C>
@ -21,7 +21,7 @@ where
F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static, F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static,
C: ButtonExt + WidgetExt, C: ButtonExt + WidgetExt,
{ {
fn on_click(self) -> () { fn on_click(self) {
self.component self.component
.connect_clicked(move |button| (self.callback)(button)); .connect_clicked(move |button| (self.callback)(button));
} }

View File

@ -1,7 +1,7 @@
use crate::{gtk::prelude::*, model::models::*, view::components::switch::SwitchExt}; use crate::{gtk::prelude::*, model::models::*, view::components::switch::SwitchExt};
pub trait SwEventHandler { pub trait SwEventHandler {
fn on_toggle(self) -> (); fn on_toggle(self);
} }
impl<F, C> SwEventHandler for EventHandler<F, C> impl<F, C> SwEventHandler for EventHandler<F, C>
@ -9,7 +9,7 @@ where
F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static, F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static,
C: SwitchExt + WidgetExt, C: SwitchExt + WidgetExt,
{ {
fn on_toggle(self) -> () { fn on_toggle(self) {
self.component self.component
.connect_state_notify(move |switch| (self.callback)(switch)); .connect_state_notify(move |switch| (self.callback)(switch));
} }