Merge branch '0.6.2' into 'master'

lumi created

Import forgotten !13 into master and bump version

See merge request !19

Change summary

CHANGELOG.md   | 3 +++
Cargo.toml     | 2 +-
src/convert.rs | 4 ++--
3 files changed, 6 insertions(+), 3 deletions(-)

Detailed changes

CHANGELOG.md 🔗

@@ -1,3 +1,6 @@
+Version 0.6.2, released 2017-08-27:
+  * Additions
+    - Link Mauve added an implementation of IntoElements for all Into<Element> ( https://gitlab.com/lumi/minidom-rs/merge_requests/19 )
 Version 0.6.1, released 2017-08-20:
   * Additions
     - Astro added Element::has_ns, which checks whether an element's namespace matches the passed argument. ( https://gitlab.com/lumi/minidom-rs/merge_requests/16 )

Cargo.toml 🔗

@@ -1,6 +1,6 @@
 [package]
 name = "minidom"
-version = "0.6.1"
+version = "0.6.2"
 authors = ["lumi <lumi@pew.im>", "Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>", "Bastien Orivel <eijebong+minidom@bananium.fr>", "Astro <astro@spaceboyz.net>"]
 description = "A small, simple DOM implementation on top of quick-xml"
 homepage = "https://gitlab.com/lumi/minidom-rs"

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());
     }
 }