Disambiguate expressions in rsx by requiring curlies

This commit is contained in:
Jonathan Kelley committed 2024-01-10 19:33:34 -08:00
1 parent 663296ae45
commit d9b84f9f8f
53 files changed
+399 -373

No files matched your search

+8 -8
View File
@@ -36,17 +36,17 @@ fn example(cx: Scope) -> Element {
div { id: "asd",
"your neighborhood spiderman"
items.iter().cycle().take(5).map(|f| rsx!{
div { "{f.a}" }
})
for item in items.iter().cycle().take(5) {
div { "{item.a}" }
}
things_list.iter().map(|f| rsx!{
div { "{f.a}" "{f.b}" }
})
for thing in things_list.iter() {
div { "{thing.a}" "{thing.b}" }
}
mything_read.as_ref().map(|f| rsx! {
if let Some(f) = mything_read.as_ref() {
div { "{f}" }
})
}
}
}
))