Skip to content

Commit

Permalink
fix: compilation error on doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanceras committed Mar 4, 2024
1 parent c1b9ad1 commit 3d6405f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions crates/sauron-core/src/vdom/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![
Expand All @@ -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![])],
Expand Down
8 changes: 4 additions & 4 deletions crates/sauron-core/src/vdom/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ impl<MSG> Node<MSG> {
/// 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![],
Expand All @@ -314,9 +314,9 @@ pub fn element<MSG>(
/// 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")],
Expand Down
8 changes: 4 additions & 4 deletions crates/sauron-core/src/vdom/node/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ impl<MSG> Attribute<MSG> {
/// 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<MSG>(name: AttributeName, value: impl Into<AttributeValue<MSG>>) -> Attribute<MSG> {
Expand All @@ -86,9 +86,9 @@ pub fn attr<MSG>(name: AttributeName, value: impl Into<AttributeValue<MSG>>) ->
/// 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<MSG>(
Expand Down

0 comments on commit 3d6405f

Please sign in to comment.