Pass clippy

This commit is contained in:
Matt Hunzinger 2024-09-16 12:29:14 -04:00
parent d02c427265
commit c126a094cb
3 changed files with 3 additions and 7 deletions

View file

@ -604,11 +604,7 @@ impl VComponent {
/// This is useful for rendering nodes outside of the VirtualDom, such as in SSR /// This is useful for rendering nodes outside of the VirtualDom, such as in SSR
/// ///
/// Returns [`None`] if the node is not mounted /// Returns [`None`] if the node is not mounted
pub fn mounted_scope<'a>( pub fn mounted_scope(&self, dynamic_node_index: usize, vnode: &VNode) -> Option<ScopeState> {
&self,
dynamic_node_index: usize,
vnode: &VNode,
) -> Option<ScopeState> {
let mount = vnode.mount.get().as_usize()?; let mount = vnode.mount.get().as_usize()?;
let rt = Runtime::current().unwrap(); let rt = Runtime::current().unwrap();

View file

@ -66,7 +66,7 @@ impl VirtualDom {
span.in_scope(|| { span.in_scope(|| {
scope.inner.borrow().reactive_context.reset_and_run_in(|| { scope.inner.borrow().reactive_context.reset_and_run_in(|| {
let mut render_return = props.render(); 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 render_return
}) })
}) })

View file

@ -139,6 +139,6 @@ impl ScopeState {
pub(crate) fn with_state<O>(&self, f: impl FnOnce(&Scope) -> O) -> O { pub(crate) fn with_state<O>(&self, f: impl FnOnce(&Scope) -> O) -> O {
let inner = self.inner.borrow(); let inner = self.inner.borrow();
let state = inner.runtime.get_state(inner.context_id).unwrap(); let state = inner.runtime.get_state(inner.context_id).unwrap();
f(&*state) f(&state)
} }
} }