fix(fn signature): remove return types from function signatures
This commit is contained in:
parent
2e543a22c8
commit
54a4b44780
|
@ -1,7 +1,7 @@
|
|||
use gtk::*;
|
||||
use gtk4 as gtk;
|
||||
|
||||
pub fn state_controller(switch: &Switch, label: &Label) -> () {
|
||||
pub fn state_controller(switch: &Switch, label: &Label) {
|
||||
if switch.state() {
|
||||
label.set_label("Режим: проверка");
|
||||
} else {
|
||||
|
|
|
@ -13,7 +13,7 @@ where
|
|||
}
|
||||
|
||||
pub trait BtnEventHandler {
|
||||
fn on_click(self) -> ();
|
||||
fn on_click(self);
|
||||
}
|
||||
|
||||
impl<F, C> BtnEventHandler for EventHandler<F, C>
|
||||
|
@ -21,7 +21,7 @@ where
|
|||
F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static,
|
||||
C: ButtonExt + WidgetExt,
|
||||
{
|
||||
fn on_click(self) -> () {
|
||||
fn on_click(self) {
|
||||
self.component
|
||||
.connect_clicked(move |button| (self.callback)(button));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{gtk::prelude::*, model::models::*, view::components::switch::SwitchExt};
|
||||
|
||||
pub trait SwEventHandler {
|
||||
fn on_toggle(self) -> ();
|
||||
fn on_toggle(self);
|
||||
}
|
||||
|
||||
impl<F, C> SwEventHandler for EventHandler<F, C>
|
||||
|
@ -9,7 +9,7 @@ where
|
|||
F: Fn(&C) + FnOnce(&C) + FnMut(&C) + 'static,
|
||||
C: SwitchExt + WidgetExt,
|
||||
{
|
||||
fn on_toggle(self) -> () {
|
||||
fn on_toggle(self) {
|
||||
self.component
|
||||
.connect_state_notify(move |switch| (self.callback)(switch));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue