Skip to content

Commit

Permalink
Fix uncompilable iter chain (not elegant?)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillsemyonkin committed Nov 5, 2023
1 parent 36ca2bd commit 055ef6e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/yew-macro/src/html_tree/html_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,13 @@ impl ToTokens for HtmlElement {
quote! {
::yew::virtual_dom::Attributes::IndexMap(
::std::rc::Rc::new(
[#(#results),*]
.into_iter()
// FIXME verify if i understood it correctly
.filter_map(|(k, v)| v.map(|v| (k, v)))
.collect()
::std::iter::Iterator::collect(
::std::iter::Iterator::filter_map(
::std::iter::IntoIterator::into_iter([#(#results),*]),
// FIXME verify if i understood it correctly
|(k, v)| v.map(|v| (k, v))
)
)
)
)
}
Expand Down

0 comments on commit 055ef6e

Please sign in to comment.