Merge pull request #1376 from iced-rs/fix/canvas-state-tag

Fix `Widget::tag` implementation of `pure::Canvas`
This commit is contained in:
Héctor Ramón 2022-07-01 04:00:32 +02:00 committed by GitHub
commit ca185c3ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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>>()
}