separate state from rsc
This commit is contained in:
@@ -159,15 +159,15 @@ pub struct SpanBuilder<State, const LEN: usize, Wa: WidgetArrLike<State, LEN, Ta
|
||||
_pd: PhantomData<(State, Tag)>,
|
||||
}
|
||||
|
||||
impl<State: StateLike<State>, const LEN: usize, Wa: WidgetArrLike<State, LEN, Tag>, Tag>
|
||||
WidgetFnTrait<State> for SpanBuilder<State, LEN, Wa, Tag>
|
||||
impl<Rsc, const LEN: usize, Wa: WidgetArrLike<Rsc, LEN, Tag>, Tag> WidgetFnTrait<Rsc>
|
||||
for SpanBuilder<Rsc, LEN, Wa, Tag>
|
||||
{
|
||||
type Widget = Span;
|
||||
|
||||
#[track_caller]
|
||||
fn run(self, state: &mut State) -> Self::Widget {
|
||||
fn run(self, rsc: &mut Rsc) -> Self::Widget {
|
||||
Span {
|
||||
children: self.children.add(state).arr.into_iter().collect(),
|
||||
children: self.children.add(rsc).arr.into_iter().collect(),
|
||||
dir: self.dir,
|
||||
gap: self.gap,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user