diff options
author | 2020-07-01 07:19:51 +0200 | |
---|---|---|
committer | 2020-07-01 07:19:51 +0200 | |
commit | d873c37e31fb052fb376caada6780137e176a6e7 (patch) | |
tree | 5b5d87802cdccb696fc3531107e4a7d900cb5a60 /web | |
parent | 08e13e00f15fb54ced21c0375e7efba4bfbf89a0 (diff) | |
download | iced-d873c37e31fb052fb376caada6780137e176a6e7.tar.gz iced-d873c37e31fb052fb376caada6780137e176a6e7.tar.bz2 iced-d873c37e31fb052fb376caada6780137e176a6e7.zip |
Update `dodrio` dependency in `iced_web`
Diffstat (limited to 'web')
-rw-r--r-- | web/Cargo.toml | 4 | ||||
-rw-r--r-- | web/src/lib.rs | 19 |
2 files changed, 10 insertions, 13 deletions
diff --git a/web/Cargo.toml b/web/Cargo.toml index 88c3102f..e03d2b63 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -15,8 +15,8 @@ categories = ["web-programming"] maintenance = { status = "actively-developed" } [dependencies] -dodrio = "0.1.0" -wasm-bindgen = "0.2.51" +dodrio = "0.2" +wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" url = "2.0" num-traits = "0.2" 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() } } |