chore: rename all &cx to cx, make clipppy happy
This commit is contained in:
1 parent
e8133e9449
commit
4eefc3f854
85 files changed
+256
-271
No files matched your search
+2
-11
@@ -53,15 +53,11 @@
|
||||
// - Do the VDOM work during the idlecallback
|
||||
// - Do DOM work in the next requestAnimationFrame callback
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
pub use crate::cfg::Config;
|
||||
use crate::dom::virtual_event_from_websys_event;
|
||||
pub use crate::util::use_eval;
|
||||
use dioxus_core::{Element, ElementId, Scope, VirtualDom};
|
||||
use futures_channel::mpsc::unbounded;
|
||||
use futures_util::{pin_mut, FutureExt, StreamExt};
|
||||
use gloo_timers::future::sleep;
|
||||
|
||||
mod cache;
|
||||
mod cfg;
|
||||
@@ -181,7 +177,7 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
wasm_bindgen::intern(s);
|
||||
}
|
||||
|
||||
let should_hydrate = cfg.hydrate;
|
||||
let _should_hydrate = cfg.hydrate;
|
||||
|
||||
let (tx, mut rx) = futures_channel::mpsc::unbounded();
|
||||
|
||||
@@ -193,8 +189,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
// } else {
|
||||
let edits = dom.rebuild();
|
||||
|
||||
log::debug!("Initial edits {:#?}", edits);
|
||||
|
||||
websys_dom.load_templates(&edits.templates);
|
||||
websys_dom.apply_edits(edits.edits);
|
||||
|
||||
@@ -214,9 +208,8 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
|
||||
futures_util::select! {
|
||||
_ = work => None,
|
||||
new_template = hotreload_rx.next() => {
|
||||
_new_template = hotreload_rx.next() => {
|
||||
todo!("Implement hot reload");
|
||||
None
|
||||
}
|
||||
evt = rx.next() => evt
|
||||
}
|
||||
@@ -251,8 +244,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
// wait for the animation frame to fire so we can apply our changes
|
||||
work_loop.wait_for_raf().await;
|
||||
|
||||
log::debug!("edits {:#?}", edits);
|
||||
|
||||
websys_dom.load_templates(&edits.templates);
|
||||
websys_dom.apply_edits(edits.edits);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user