Evan Almloff hai 1 ano
pai
achega
efd301a878

+ 1 - 1
packages/core/src/any_props.rs

@@ -32,7 +32,7 @@ impl Clone for BoxedAnyProps {
 
 /// A trait that essentially allows VComponentProps to be used generically
 pub(crate) trait AnyProps {
-    fn render<'a>(&'a self) -> RenderReturn;
+    fn render(&self) -> RenderReturn;
     fn memoize(&self, other: &dyn Any) -> bool;
     fn props(&self) -> &dyn Any;
     fn duplicate(&self) -> Box<dyn AnyProps>;

+ 2 - 2
packages/core/src/arena.rs

@@ -1,5 +1,5 @@
 use crate::{
-    innerlude::DirtyScope, nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, DynamicNode,
+    nodes::VNode, virtual_dom::VirtualDom, DynamicNode,
     ScopeId,
 };
 
@@ -60,7 +60,7 @@ impl VirtualDom {
     // Drop a scope and all its children
     //
     // Note: This will not remove any ids from the arena
-    pub(crate) fn drop_scope(&mut self, id: ScopeId, recursive: bool) {
+    pub(crate) fn drop_scope(&mut self, _id: ScopeId, _recursive: bool) {
         // todo: Do we need this now that we don't have a bunch of unsafe code?
         // self.dirty_scopes.remove(&DirtyScope {
         //     height: self.scopes[id.0].height(),

+ 2 - 2
packages/core/src/create.rs

@@ -345,7 +345,7 @@ impl VirtualDom {
         attribute.mounted_element.set(id);
 
         // Safety: we promise not to re-alias this text later on after committing it to the mutation
-        let unbounded_name: &str = &attribute.name;
+        let unbounded_name: &str = attribute.name;
 
         match &attribute.value {
             AttributeValue::Listener(_) => {
@@ -564,7 +564,7 @@ impl VirtualDom {
     fn load_scope_from_vcomponent(
         &mut self,
         component: &VComponent,
-        to: &mut impl WriteMutations,
+        _to: &mut impl WriteMutations,
     ) -> ScopeId {
         component.scope.get().unwrap_or_else(|| {
             self.new_scope(component.props.clone(), component.name)

+ 2 - 2
packages/core/src/diff.rs

@@ -252,7 +252,7 @@ impl VirtualDom {
         parent: Option<&ElementRef>,
         to: &mut impl WriteMutations,
     ) {
-        let m = self.create_component_node(parent, right, to);
+        let _m = self.create_component_node(parent, right, to);
 
         // TODO: Instead of *just* removing it, we can use the replace mutation
         self.remove_component_node(left, true, to);
@@ -854,7 +854,7 @@ impl VirtualDom {
             "replace_nodes must have at least one node"
         );
 
-        self.remove_nodes(&nodes, to);
+        self.remove_nodes(nodes, to);
     }
 
     /// Remove these nodes from the dom

+ 1 - 1
packages/core/src/virtual_dom.rs

@@ -597,7 +597,7 @@ impl VirtualDom {
 
             self.wait_for_work().await;
 
-            _ = self.render_immediate(&mut NoOpMutations);
+            self.render_immediate(&mut NoOpMutations);;
         }
     }