clean up prelude (#4416)
* clear away prelude on dioxus * clippy * wip - drop prelude from dioxus-html * docs clippy * wip * more fixe * delete all preludes * doc... * better export * merge some imports * fewer global imports * global incremental renderer * fix cargo doc
This commit is contained in:
1 parent
54d465a7b5
commit
4f1d039bad
140 files changed
+374
-477
No files matched your search
@@ -100,8 +100,7 @@ impl ToTokens for Component {
|
||||
|
||||
// todo: ensure going through the trait actually works
|
||||
// we want to avoid importing traits
|
||||
// use dioxus_core::prelude::Properties;
|
||||
use dioxus_core::prelude::Properties;
|
||||
use dioxus_core::Properties;
|
||||
let __comp = ({
|
||||
#props
|
||||
}).into_vcomponent(
|
||||
@@ -223,7 +222,7 @@ impl Component {
|
||||
// we only want to span the name and generics, not the `fc_to_builder` call so jump-to-def
|
||||
// only finds the single entry (#name)
|
||||
let spanned = quote_spanned! { self.name.span() => #name #generics };
|
||||
quote! { fc_to_builder(#spanned) }
|
||||
quote! { dioxus_core::fc_to_builder(#spanned) }
|
||||
};
|
||||
|
||||
tokens.append_all(self.add_fields_to_builder(
|
||||
@@ -306,7 +305,19 @@ impl Component {
|
||||
"Custom attributes are not supported for components that are spread",
|
||||
).emit_as_expr_tokens());
|
||||
} else {
|
||||
tokens.append_all(quote! { .push_attribute(#name, None, #value, false) })
|
||||
// tokens = quote! {
|
||||
// dioxus_core::HasAttributes::push_attribute(
|
||||
// #tokens,
|
||||
// #name,
|
||||
// None,
|
||||
// #value,
|
||||
// false
|
||||
// )
|
||||
// };
|
||||
|
||||
tokens.append_all(quote! {
|
||||
.push_attribute(#name, None, #value, false)
|
||||
})
|
||||
}
|
||||
}
|
||||
// spreads are handled elsewhere
|
||||
@@ -353,8 +364,7 @@ fn normalize_path(name: &mut syn::Path) -> Option<AngleBracketedGenericArguments
|
||||
};
|
||||
|
||||
if let Some(generics) = generics.as_mut() {
|
||||
use syn::Token;
|
||||
generics.colon2_token = Some(Token));
|
||||
generics.colon2_token = Some(syn::Token));
|
||||
}
|
||||
|
||||
generics
|
||||
|
||||
Reference in new issue
Block a user