Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry committed Sep 30, 2019
1 parent d4d9051 commit 1a54c20
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/nested_list/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl fmt::Display for Hovered {

impl<CHILD> From<VChild<CHILD, List>> for ListVariant
where
CHILD: Component + Renderable<CHILD>,
CHILD: Component,
CHILD::Properties: Into<Variants>,
{
fn from(vchild: VChild<CHILD, List>) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion examples/routing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::router_button::RouterButton;
use log::info;
use router::Route;
use yew::agent::Bridged;
use yew::{html, Bridge, Component, ComponentLink, Html, ShouldRender};
use yew::{html, Bridge, Component, ComponentLink, Html, Renderable, ShouldRender};

pub enum Child {
A,
Expand Down
5 changes: 2 additions & 3 deletions examples/routing/src/router_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ impl Component for RouterButton {
}
}
}

fn change(&mut self, props: Self::Properties) -> ShouldRender {
self.props = props;
true
}
}

impl Renderable<RouterButton> for RouterButton {
fn view(&self) -> Html<RouterButton> {
fn render(&self) -> Html<RouterButton> {
html! {
<button
class=self.props.classes.clone(),
Expand Down
2 changes: 1 addition & 1 deletion examples/two_apps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use yew::html::Scope;
/// This example demonstrates low-level usage of scopes.
use yew::{html, Component, ComponentLink, Html, Renderable, ShouldRender};
use yew::{html, Component, ComponentLink, Html, ShouldRender};

pub struct Model {
scope: Option<Scope<Model>>,
Expand Down
2 changes: 1 addition & 1 deletion src/html/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ where

impl<COMP> Default for Scope<COMP>
where
COMP: Component + Renderable<COMP>,
COMP: Component,
{
fn default() -> Self {
Scope::new()
Expand Down
2 changes: 1 addition & 1 deletion src/virtual_dom/vnode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<COMP: Component> From<VComp<COMP>> for VNode<COMP> {
impl<COMP, CHILD> From<VChild<CHILD, COMP>> for VNode<COMP>
where
COMP: Component,
CHILD: Component + Renderable<CHILD>,
CHILD: Component,
{
fn from(vchild: VChild<CHILD, COMP>) -> Self {
VNode::VComp(VComp::from(vchild))
Expand Down

0 comments on commit 1a54c20

Please sign in to comment.