mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
Pass clippy
This commit is contained in:
parent
d02c427265
commit
c126a094cb
3 changed files with 3 additions and 7 deletions
|
@ -604,11 +604,7 @@ impl VComponent {
|
|||
/// This is useful for rendering nodes outside of the VirtualDom, such as in SSR
|
||||
///
|
||||
/// Returns [`None`] if the node is not mounted
|
||||
pub fn mounted_scope<'a>(
|
||||
&self,
|
||||
dynamic_node_index: usize,
|
||||
vnode: &VNode,
|
||||
) -> Option<ScopeState> {
|
||||
pub fn mounted_scope(&self, dynamic_node_index: usize, vnode: &VNode) -> Option<ScopeState> {
|
||||
let mount = vnode.mount.get().as_usize()?;
|
||||
|
||||
let rt = Runtime::current().unwrap();
|
||||
|
|
|
@ -66,7 +66,7 @@ impl VirtualDom {
|
|||
span.in_scope(|| {
|
||||
scope.inner.borrow().reactive_context.reset_and_run_in(|| {
|
||||
let mut render_return = props.render();
|
||||
self.handle_element_return(&mut render_return, scope_id, &scope_state);
|
||||
self.handle_element_return(&mut render_return, scope_id, scope_state);
|
||||
render_return
|
||||
})
|
||||
})
|
||||
|
|
|
@ -139,6 +139,6 @@ impl ScopeState {
|
|||
pub(crate) fn with_state<O>(&self, f: impl FnOnce(&Scope) -> O) -> O {
|
||||
let inner = self.inner.borrow();
|
||||
let state = inner.runtime.get_state(inner.context_id).unwrap();
|
||||
f(&*state)
|
||||
f(&state)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue