Merge pull request #1376 from iced-rs/fix/canvas-state-tag
Fix `Widget::tag` implementation of `pure::Canvas`
This commit is contained in:
commit
ca185c3ea4
2 changed files with 3 additions and 3 deletions
|
|
@ -109,7 +109,8 @@ where
|
|||
B: Backend,
|
||||
{
|
||||
fn tag(&self) -> tree::Tag {
|
||||
tree::Tag::of::<P::State>()
|
||||
struct Tag<T>(T);
|
||||
tree::Tag::of::<Tag<P::State>>()
|
||||
}
|
||||
|
||||
fn state(&self) -> tree::State {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@ where
|
|||
})
|
||||
}
|
||||
|
||||
struct Tag<T>(T);
|
||||
|
||||
struct Instance<'a, Message, Renderer, Event, S> {
|
||||
state: RefCell<Option<State<'a, Message, Renderer, Event, S>>>,
|
||||
}
|
||||
|
|
@ -132,6 +130,7 @@ where
|
|||
Renderer: iced_native::Renderer,
|
||||
{
|
||||
fn tag(&self) -> tree::Tag {
|
||||
struct Tag<T>(T);
|
||||
tree::Tag::of::<Tag<S>>()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue