From b49ea5175d73d6d2e1863d326d3469e83aeaf682 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 21 Jul 2017 00:02:11 +0100 Subject: [PATCH] implement IntoElements on Into instead of Element --- src/convert.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/convert.rs b/src/convert.rs index 126688b7..1b35414c 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -51,9 +51,9 @@ impl IntoElements for Option { } } -impl IntoElements for Element { +impl IntoElements for T where T: Into { fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self); + emitter.append_child(self.into()); } }