diff --git a/crates/sauron-core/src/vdom/diff.rs b/crates/sauron-core/src/vdom/diff.rs index 4c812975c..218fc1e02 100644 --- a/crates/sauron-core/src/vdom/diff.rs +++ b/crates/sauron-core/src/vdom/diff.rs @@ -16,10 +16,10 @@ use std::{cmp, mem}; /// /// # Example /// ```rust -/// use mt_dom::{diff::*, patch::*, *}; +/// use sauron::{diff::*, vdom::element, *}; /// /// -/// let old: Node = element( +/// let old: Node<()> = element( /// "main", /// vec![attr("class", "container")], /// vec![ @@ -28,7 +28,7 @@ use std::{cmp, mem}; /// ], /// ); /// -/// let new: Node = element( +/// let new: Node<()> = element( /// "main", /// vec![attr("class", "container")], /// vec![element("div", vec![attr("key", "2")], vec![])], diff --git a/crates/sauron-core/src/vdom/node.rs b/crates/sauron-core/src/vdom/node.rs index b7e63bc32..0eb1b0c8c 100644 --- a/crates/sauron-core/src/vdom/node.rs +++ b/crates/sauron-core/src/vdom/node.rs @@ -294,9 +294,9 @@ impl Node { /// create a virtual node with tag, attrs and children /// # Example /// ```rust -/// use mt_dom::{Node,element,attr}; +/// use sauron::{Node,vdom::element,attr}; /// -/// let div:Node = element( +/// let div:Node<()> = element( /// "div", /// vec![attr("class", "container")], /// vec![], @@ -314,9 +314,9 @@ pub fn element( /// create a virtual node with namespace, tag, attrs and children /// # Example /// ```rust -/// use mt_dom::{Node,element_ns,attr}; +/// use sauron::{Node, vdom::element_ns,attr}; /// -/// let svg: Node = element_ns( +/// let svg: Node<()> = element_ns( /// Some("http://www.w3.org/2000/svg"), /// "svg", /// vec![attr("width","400"), attr("height","400")], diff --git a/crates/sauron-core/src/vdom/node/attribute.rs b/crates/sauron-core/src/vdom/node/attribute.rs index b0f99be9f..10c4beb2a 100644 --- a/crates/sauron-core/src/vdom/node/attribute.rs +++ b/crates/sauron-core/src/vdom/node/attribute.rs @@ -75,8 +75,8 @@ impl Attribute { /// Create an attribute /// # Example /// ```rust -/// use mt_dom::{Attribute,attr}; -/// let class: Attribute = attr("class", "container"); +/// use sauron::vdom::{Attribute,attr}; +/// let class: Attribute<()> = attr("class", "container"); /// ``` #[inline] pub fn attr(name: AttributeName, value: impl Into>) -> Attribute { @@ -86,9 +86,9 @@ pub fn attr(name: AttributeName, value: impl Into>) -> /// Create an attribute with namespace /// # Example /// ```rust -/// use mt_dom::{Attribute,attr_ns}; +/// use sauron::vdom::{Attribute,attr_ns}; /// -/// let href: Attribute = attr_ns(Some("http://www.w3.org/1999/xlink"), "href", "cool-script.js"); +/// let href: Attribute<()> = attr_ns(Some("http://www.w3.org/1999/xlink"), "href", "cool-script.js"); /// ``` #[inline] pub fn attr_ns(