Browse Source

clean up warnings and update prelude

Evan Almloff 2 năm trước cách đây
mục cha
commit
cb17252a21
3 tập tin đã thay đổi với 10 bổ sung10 xóa
  1. 7 7
      packages/core/src/lib.rs
  2. 2 2
      packages/core/src/nodes.rs
  3. 1 1
      packages/core/src/virtual_dom.rs

+ 7 - 7
packages/core/src/lib.rs

@@ -70,10 +70,10 @@ pub(crate) mod innerlude {
 }
 
 pub use crate::innerlude::{
-    fc_to_builder, Attribute, AttributeValue, CapturedError, Component, DynamicNode, Element,
-    ElementId, Event, Fragment, IntoDynNode, LazyNodes, Mutation, Mutations, Properties,
-    RenderReturn, Scope, ScopeId, ScopeState, Scoped, SuspenseContext, TaskId, Template,
-    TemplateAttribute, TemplateNode, VComponent, VNode, VText, VirtualDom,
+    fc_to_builder, AnyValueContainer, Attribute, AttributeValue, CapturedError, Component,
+    DynamicNode, Element, ElementId, Event, Fragment, IntoDynNode, LazyNodes, Mutation, Mutations,
+    Properties, RenderReturn, Scope, ScopeId, ScopeState, Scoped, SuspenseContext, TaskId,
+    Template, TemplateAttribute, TemplateNode, VComponent, VNode, VText, VirtualDom,
 };
 
 /// The purpose of this module is to alleviate imports of many common types
@@ -81,9 +81,9 @@ pub use crate::innerlude::{
 /// This includes types like [`Scope`], [`Element`], and [`Component`].
 pub mod prelude {
     pub use crate::innerlude::{
-        fc_to_builder, Component, Element, Event, EventHandler, Fragment, LazyNodes, Properties,
-        Scope, ScopeId, ScopeState, Scoped, TaskId, Template, TemplateAttribute, TemplateNode,
-        Throw, VNode, VirtualDom,
+        fc_to_builder, Component, Element, Event, EventHandler, Fragment, IntoAttributeValue,
+        LazyNodes, Properties, Scope, ScopeId, ScopeState, Scoped, TaskId, Template,
+        TemplateAttribute, TemplateNode, Throw, VNode, VirtualDom,
     };
 }
 

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

@@ -673,7 +673,7 @@ impl<T: Any + PartialEq + Send + Sync + 'static> AnyValue for T {
         if let Some(other) = other.as_any().downcast_ref() {
             self == other
         } else {
-            return false;
+            false
         }
     }
 
@@ -698,7 +698,7 @@ impl<T: Any + PartialEq + 'static> AnyValue for T {
         if let Some(other) = other.as_any().downcast_ref() {
             self == other
         } else {
-            return false;
+            false
         }
     }
 

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

@@ -640,7 +640,7 @@ impl VirtualDom {
     }
 
     /// Swap the current mutations with a new
-    fn finalize<'a>(&'a mut self) -> Mutations<'a> {
+    fn finalize(&mut self) -> Mutations {
         self.mutations.take()
     }
 }