remove state generic from a lot of things
This commit is contained in:
1 parent
7e6369029f
commit
30bc55c78e
45 files changed
+740
-856
No files matched your search
@@ -8,13 +8,13 @@ pub struct EventCtx<'a, State, Data> {
|
||||
}
|
||||
|
||||
pub struct EventIdCtx<'a, State, Data, W: ?Sized> {
|
||||
pub widget: WidgetRef<State, W>,
|
||||
pub widget: WidgetRef<W>,
|
||||
pub state: &'a mut State,
|
||||
pub data: &'a mut Data,
|
||||
}
|
||||
|
||||
impl<State: HasUi, Data, W: ?Sized> Deref for EventIdCtx<'_, State, Data, W> {
|
||||
type Target = Ui<State>;
|
||||
type Target = Ui;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
self.state.ui_ref()
|
||||
@@ -27,7 +27,7 @@ impl<State: HasUi, Data, W: ?Sized> DerefMut for EventIdCtx<'_, State, Data, W>
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, State: HasUi + 'static, Data, W: Widget<State>> EventIdCtx<'a, State, Data, W> {
|
||||
impl<'a, State: HasUi + 'static, Data, W: Widget> EventIdCtx<'a, State, Data, W> {
|
||||
pub fn widget(&mut self) -> &mut W {
|
||||
&mut self.state.ui()[self.widget]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user