fix clippy
This commit is contained in:
1 parent
5ed116b060
commit
31cd15d61f
1 file changed
+4
-22
+4
-22
@@ -1,7 +1,3 @@
|
||||
//! Example: README.md showcase
|
||||
//!
|
||||
//! The example from the README.md.
|
||||
|
||||
use dioxus::{
|
||||
core::{exports::bumpalo::Bump, Attribute, HasAttributesBox},
|
||||
html::{ExtendedGlobalAttributesMarker, GlobalAttributesExtension},
|
||||
@@ -10,7 +6,7 @@ use dioxus::{
|
||||
|
||||
fn main() {
|
||||
let mut dom = VirtualDom::new(app);
|
||||
dom.rebuild();
|
||||
let _ = dom.rebuild();
|
||||
let html = dioxus_ssr::render(&dom);
|
||||
|
||||
println!("{}", html);
|
||||
@@ -79,22 +75,8 @@ impl ExtendedGlobalAttributesMarker for Props<'_> {}
|
||||
fn Component<'a>(cx: Scope<'a, Props<'a>>) -> Element<'a> {
|
||||
let attributes = &cx.props.attributes;
|
||||
render! {
|
||||
// rsx! {
|
||||
// audio {
|
||||
// ...attributes,
|
||||
// }
|
||||
// }
|
||||
::dioxus::core::LazyNodes::new(move |__cx: &::dioxus::core::ScopeState| -> ::dioxus::core::VNode {
|
||||
static TEMPLATE: ::dioxus::core::Template = ::dioxus::core::Template { name: concat!(file!(), ":", line!(), ":", column!(), ":", "123" ), roots: &[::dioxus::core::TemplateNode::Element { tag: dioxus_elements::audio::TAG_NAME, namespace: dioxus_elements::audio::NAME_SPACE, attrs: &[::dioxus::core::TemplateAttribute::Dynamic { id: 0usize }], children: &[] }], node_paths: &[], attr_paths: &[&[0u8]] };
|
||||
let attrs = vec![(&**attributes).into()];
|
||||
::dioxus::core::VNode {
|
||||
parent: None,
|
||||
key: None,
|
||||
template: std::cell::Cell::new(TEMPLATE),
|
||||
root_ids: dioxus::core::exports::bumpalo::collections::Vec::new_in(__cx.bump()).into(),
|
||||
dynamic_nodes: __cx.bump().alloc([]),
|
||||
dynamic_attrs: __cx.bump().alloc(attrs),
|
||||
}
|
||||
})
|
||||
audio {
|
||||
..attributes,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user