chore: tweak generic arguments and iterators in rsx
This commit is contained in:
1 parent
e8ae830cf2
commit
e09b6bf813
7 files changed
+93
-66
No files matched your search
@@ -8,11 +8,12 @@ fn app(cx: Scope) -> Element {
|
||||
cx.render(rsx!(
|
||||
// Use Map directly to lazily pull elements
|
||||
(0..10).map(|f| rsx! { "{f}" }),
|
||||
// Collect into an intermediate collection if necessary
|
||||
// Collect into an intermediate collection if necessary, and call into_iter
|
||||
["a", "b", "c"]
|
||||
.into_iter()
|
||||
.map(|f| rsx! { "{f}" })
|
||||
.collect::<Vec<_>>(),
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter(),
|
||||
// Use optionals
|
||||
Some(rsx! { "Some" }),
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user