implement IntoElements on Into<Element> instead of Element

Emmanuel Gil Peyrot created

Change summary

src/convert.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

src/convert.rs 🔗

@@ -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) {
-        emitter.append_child(self);
+        emitter.append_child(self.into());
     }
 }