Skip to content

Commit e5b2cf3

Browse files
authored
Fix autocompletion in html macro for rust-analyzer (#3829)
1 parent cd32e17 commit e5b2cf3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/yew-macro/src/html_tree/html_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ use quote::{quote, quote_spanned, ToTokens};
33
use syn::buffer::Cursor;
44
use syn::parse::{Parse, ParseStream, Result};
55
use syn::spanned::Spanned;
6-
use syn::{Expr, Lit};
6+
use syn::Lit;
77

88
use super::ToNodeIterator;
99
use crate::stringify::Stringify;
1010
use crate::PeekValue;
1111

1212
pub enum HtmlNode {
1313
Literal(Box<Lit>),
14-
Expression(Box<Expr>),
14+
Expression(Box<TokenStream>),
1515
}
1616

1717
impl Parse for HtmlNode {

packages/yew-macro/src/html_tree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl HtmlChildrenTree {
247247
.iter()
248248
.map(|child| quote_spanned! {child.span()=> ::std::convert::Into::into(#child) });
249249
return quote! {
250-
::std::vec![#(#children_into),*]
250+
[#(#children_into),*].to_vec()
251251
};
252252
}
253253

0 commit comments

Comments
 (0)