mirror of https://github.com/yewstack/yew
Fix autocompletion in html macro for rust-analyzer (#3829)
This commit is contained in:
parent
cd32e17b1f
commit
e5b2cf3611
|
@ -3,7 +3,7 @@ use quote::{quote, quote_spanned, ToTokens};
|
|||
use syn::buffer::Cursor;
|
||||
use syn::parse::{Parse, ParseStream, Result};
|
||||
use syn::spanned::Spanned;
|
||||
use syn::{Expr, Lit};
|
||||
use syn::Lit;
|
||||
|
||||
use super::ToNodeIterator;
|
||||
use crate::stringify::Stringify;
|
||||
|
@ -11,7 +11,7 @@ use crate::PeekValue;
|
|||
|
||||
pub enum HtmlNode {
|
||||
Literal(Box<Lit>),
|
||||
Expression(Box<Expr>),
|
||||
Expression(Box<TokenStream>),
|
||||
}
|
||||
|
||||
impl Parse for HtmlNode {
|
||||
|
|
|
@ -247,7 +247,7 @@ impl HtmlChildrenTree {
|
|||
.iter()
|
||||
.map(|child| quote_spanned! {child.span()=> ::std::convert::Into::into(#child) });
|
||||
return quote! {
|
||||
::std::vec![#(#children_into),*]
|
||||
[#(#children_into),*].to_vec()
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue