switch away from handles to refs that must be upgraded once
This commit is contained in:
@@ -151,14 +151,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> FnOnce<(&mut State,)>
|
||||
for SpanBuilder<State, LEN, Wa, Tag>
|
||||
impl<State: StateLike<State>, const LEN: usize, Wa: WidgetArrLike<State, LEN, Tag>, Tag>
|
||||
WidgetFnTrait<State> for SpanBuilder<State, LEN, Wa, Tag>
|
||||
{
|
||||
type Output = Span;
|
||||
type Widget = Span;
|
||||
|
||||
extern "rust-call" fn call_once(self, args: (&mut State,)) -> Self::Output {
|
||||
#[track_caller]
|
||||
fn run(self, state: &mut State) -> Self::Widget {
|
||||
Span {
|
||||
children: self.children.add(args.0).arr.into_iter().collect(),
|
||||
children: self.children.add(state).arr.into_iter().collect(),
|
||||
dir: self.dir,
|
||||
gap: self.gap,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user