lib: Use associated types in views

This commit is contained in:
Erik Kundt
2024-04-24 13:26:12 +02:00
parent 956ca70f4a
commit 166add7780
6 changed files with 60 additions and 31 deletions
+5 -2
View File
@@ -126,7 +126,10 @@ impl<S, A> TextField<S, A> {
}
}
impl<S, A> View<S, A> for TextField<S, A> {
impl<S, A> View for TextField<S, A> {
type Action = A;
type State = S;
fn new(_state: &S, action_tx: UnboundedSender<A>) -> Self {
Self {
base: BaseView {
@@ -186,7 +189,7 @@ impl<S, A> View<S, A> for TextField<S, A> {
}
}
impl<B, S, A> Widget<B, S, A> for TextField<S, A>
impl<B, S, A> Widget<B> for TextField<S, A>
where
B: Backend,
{