Skip to content

impl Render<T: Render> for Option<T> #446

@martinhath

Description

@martinhath

Thanks for a nice library!

I ran into a case where I want to conditionally insert some markup, the condition being on an Option. Ended up writing

html! {
    @if let Some(n) = foo() { (n) }
}

but it would have been cool if

html! {
    (foo())
}

worked, and behaved identically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions