diff --git a/tests/vcomp_test.rs b/tests/vcomp_test.rs index 84d08a9fabc..b7f2ab54004 100644 --- a/tests/vcomp_test.rs +++ b/tests/vcomp_test.rs @@ -1,11 +1,9 @@ #[macro_use] extern crate yew; -use yew::html::{Component, Env, Html, Renderable, ShouldRender}; +use yew::prelude::*; use yew::virtual_dom::VNode; -type Ctx = (); - struct Comp; #[derive(PartialEq, Clone)] @@ -23,40 +21,40 @@ impl Default for Props { } } -impl Component for Comp { +impl Component for Comp { type Message = (); type Properties = Props; - fn create(_: Self::Properties, _: &mut Env) -> Self { + fn create(_: Self::Properties, _: ComponentLink) -> Self { Comp } - fn update(&mut self, _: Self::Message, _: &mut Env) -> ShouldRender { + fn update(&mut self, _: Self::Message) -> ShouldRender { unimplemented!(); } } -impl Renderable for Comp { - fn view(&self) -> Html { +impl Renderable for Comp { + fn view(&self) -> Html { unimplemented!(); } } #[test] fn set_properties_to_component() { - let _: VNode = html! { + let _: VNode = html! { }; - let _: VNode = html! { + let _: VNode = html! { }; - let _: VNode = html! { + let _: VNode = html! { }; - let _: VNode = html! { + let _: VNode = html! { }; @@ -65,7 +63,7 @@ fn set_properties_to_component() { field_2: 1, }; - let _: VNode = html! { + let _: VNode = html! { }; } diff --git a/tests/vlist_test.rs b/tests/vlist_test.rs index 027293bccff..7487b8a6940 100644 --- a/tests/vlist_test.rs +++ b/tests/vlist_test.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate yew; -use yew::html::{Component, ComponentLink, Html, Renderable, ShouldRender}; +use yew::prelude::*; use yew::virtual_dom::VNode; struct Comp; diff --git a/tests/vtag_test.rs b/tests/vtag_test.rs index 810f621b332..d284c56e407 100644 --- a/tests/vtag_test.rs +++ b/tests/vtag_test.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate yew; -use yew::html::{Component, ComponentLink, Html, Renderable, ShouldRender}; +use yew::prelude::*; use yew::virtual_dom::VNode; struct Comp;