Skip to content

Commit

Permalink
Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechu10 committed Nov 6, 2021
1 parent a914b9c commit 2f51b18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/sycamore/src/builder/agnostic/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! The renderer-agnostic API.
use crate::component::Component;
use crate::generic_node::GenericNode;
use crate::generic_node::{GenericNode, Html};
use crate::noderef::NodeRef;
use crate::template::Template;
use crate::utils::render;
Expand Down Expand Up @@ -51,13 +51,13 @@ where
/// }
///
/// // Elsewhere in another component.
/// # fn view<G: GenericNode>() -> Template<G> {
/// # fn view<G: Html>() -> Template<G> {
/// component::<_, MyComponent<_>>(())
/// # }
/// ```
pub fn component<G, C>(props: C::Props) -> Template<G>
where
G: GenericNode,
G: GenericNode + Html,
C: Component<G>,
{
C::__create_component(props)
Expand Down Expand Up @@ -197,7 +197,7 @@ where
/// h1().text("My component").build()
/// }
///
/// # fn _test<G: GenericNode>() -> Template<G> {
/// # fn _test<G: Html>() -> Template<G> {
/// div().component::<MyComponent<_>>(()).build()
/// }
/// ```
Expand Down

0 comments on commit 2f51b18

Please sign in to comment.