feat: massage lifetimes

This commit is contained in:
Jonathan Kelley committed 2021-10-16 17:37:28 -04:00
1 parent 16dbf4a6f8
commit 9726a065b0
92 files changed
+250 -241

No files matched your search

+6 -6
View File
@@ -44,7 +44,7 @@ pub fn render_vdom_scope(vdom: &VirtualDom, scope: ScopeId) -> Option<String> {
///
/// ## Example
/// ```ignore
/// static App: FC<()> = |cx, props|cx.render(rsx!(div { "hello world" }));
/// static App: FC<()> = |(cx, props)|cx.render(rsx!(div { "hello world" }));
/// let mut vdom = VirtualDom::new(App);
/// vdom.rebuild();
///
@@ -243,13 +243,13 @@ mod tests {
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
static SIMPLE_APP: FC<()> = |cx, props| {
static SIMPLE_APP: FC<()> = |(cx, props)| {
cx.render(rsx!(div {
"hello world!"
}))
};
static SLIGHTLY_MORE_COMPLEX: FC<()> = |cx, props| {
static SLIGHTLY_MORE_COMPLEX: FC<()> = |(cx, props)| {
cx.render(rsx! {
div {
title: "About W3Schools"
@@ -268,14 +268,14 @@ mod tests {
})
};
static NESTED_APP: FC<()> = |cx, props| {
static NESTED_APP: FC<()> = |(cx, props)| {
cx.render(rsx!(
div {
SIMPLE_APP {}
}
))
};
static FRAGMENT_APP: FC<()> = |cx, props| {
static FRAGMENT_APP: FC<()> = |(cx, props)| {
cx.render(rsx!(
div { "f1" }
div { "f2" }
@@ -331,7 +331,7 @@ mod tests {
#[test]
fn styles() {
static STLYE_APP: FC<()> = |cx, props| {
static STLYE_APP: FC<()> = |(cx, props)| {
cx.render(rsx! {
div { style: { color: "blue", font_size: "46px" } }
})