fix clippy issues

This commit is contained in:
2024-12-11 09:11:30 +07:00
parent 516eb0e8bc
commit 10f042acab
49 changed files with 661 additions and 319 deletions

View File

@@ -6,13 +6,15 @@ use gpui::{
};
use std::{cell::RefCell, rc::Rc, time::Duration};
type OnClick = Option<Rc<dyn Fn(&bool, &mut WindowContext)>>;
pub struct Switch {
id: ElementId,
checked: bool,
disabled: bool,
label: Option<SharedString>,
label_side: Side,
on_click: Option<Rc<dyn Fn(&bool, &mut WindowContext)>>,
on_click: OnClick,
size: Size,
}