summaryrefslogtreecommitdiffstats
path: root/web/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-07-01 22:44:48 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-01 22:44:48 +0200
commit3f44d331d9c7afe14416130f54abd2b327a686bf (patch)
treefa68d060aabedda82c268a4cc06c501cbf1e626b /web/src/lib.rs
parent99a50d6b2ff2c54c276d3a142071bd77ac38e4f0 (diff)
parent75464ad89422884e0718eb0429586a9d77f61c71 (diff)
downloadiced-3f44d331d9c7afe14416130f54abd2b327a686bf.tar.gz
iced-3f44d331d9c7afe14416130f54abd2b327a686bf.tar.bz2
iced-3f44d331d9c7afe14416130f54abd2b327a686bf.zip
Merge pull request #432 from hecrj/improvement/update-dodrio
Update `dodrio` in `iced_web`
Diffstat (limited to '')
-rw-r--r--web/src/lib.rs19
1 files changed, 8 insertions, 11 deletions
diff --git a/web/src/lib.rs b/web/src/lib.rs
index 53b54b7e..b7970c56 100644
--- a/web/src/lib.rs
+++ b/web/src/lib.rs
@@ -238,28 +238,25 @@ struct Instance<A: Application> {
bus: Bus<A::Message>,
}
-impl<A> dodrio::Render for Instance<A>
+impl<'a, A> dodrio::Render<'a> for Instance<A>
where
A: Application,
{
- fn render<'a, 'bump>(
- &'a self,
- bump: &'bump bumpalo::Bump,
- ) -> dodrio::Node<'bump>
- where
- 'a: 'bump,
- {
+ fn render(
+ &self,
+ context: &mut dodrio::RenderContext<'a>,
+ ) -> dodrio::Node<'a> {
use dodrio::builder::*;
let mut ui = self.application.borrow_mut();
let element = ui.view();
let mut css = Css::new();
- let node = element.widget.node(bump, &self.bus, &mut css);
+ let node = element.widget.node(context.bump, &self.bus, &mut css);
- div(bump)
+ div(context.bump)
.attr("style", "width: 100%; height: 100%")
- .children(vec![css.node(bump), node])
+ .children(vec![css.node(context.bump), node])
.finish()
}
}