You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently a nightly feature for then and then_with functions on bools that allow them to be turned into Options using a provided value or closure.
This in conjunction with unwrap_or_default can be used to easily write "show this html or nothing" sections.
A stable shim trait for this could be added to this crate, have it live in experimental, and then remove it once the actual feature stabilizes.
There is currently a nightly feature for
thenandthen_withfunctions onbools that allow them to be turned intoOptionsusing a provided value or closure.This in conjunction with
unwrap_or_defaultcan be used to easily write "show this html or nothing" sections.A stable shim trait for this could be added to this crate, have it live in experimental, and then remove it once the actual feature stabilizes.
https://doc.rust-lang.org/std/primitive.bool.html#method.then_with