implement IntoElements on Into<Element> instead of Element

This commit is contained in:
Emmanuel Gil Peyrot 2017-07-21 00:02:11 +01:00
parent 5d0e4721f6
commit b49ea5175d

View file

@ -51,9 +51,9 @@ impl<T: IntoElements> IntoElements for Option<T> {
} }
} }
impl IntoElements for Element { impl<T> IntoElements for T where T: Into<Element> {
fn into_elements(self, emitter: &mut ElementEmitter) { fn into_elements(self, emitter: &mut ElementEmitter) {
emitter.append_child(self); emitter.append_child(self.into());
} }
} }