Jonathan Kelley 4 éve
szülő
commit
beceda5

+ 5 - 5
packages/core/examples/async.rs

@@ -1,13 +1,13 @@
-use std::pin::Pin;
+
 
 use dioxus_core::prelude::*;
-use std::future::Future;
+
 
 fn main() {}
 
 const App: FC<()> = |cx| {
     // create a new future
-    let mut fut = cx.use_hook(
+    let _fut = cx.use_hook(
         || {
             //
             async { loop {} }
@@ -26,11 +26,11 @@ const App: FC<()> = |cx| {
 const Task: FC<()> = |cx| {
     //
 
-    let s = cx.use_task(|| async { "hello world".to_string() });
+    let _s = cx.use_task(|| async { "hello world".to_string() });
 
     todo!()
 };
 
-fn use_mut<P, T>(cx: Context<P>, f: impl FnOnce() -> T) -> &mut T {
+fn use_mut<P, T>(_cx: Context<P>, _f: impl FnOnce() -> T) -> &mut T {
     todo!()
 }

+ 2 - 2
packages/core/examples/borrowed.rs

@@ -7,7 +7,7 @@
 fn main() {}
 
 use dioxus_core::prelude::*;
-use dioxus_core::*;
+
 use std::rc::Rc;
 
 struct AppProps {
@@ -61,7 +61,7 @@ fn ChildItem<'a>(cx: Context<'a, ChildProps>) -> VNode {
 }
 
 impl PartialEq for ChildProps {
-    fn eq(&self, other: &Self) -> bool {
+    fn eq(&self, _other: &Self) -> bool {
         false
     }
 }

+ 1 - 1
packages/core/examples/fragment.rs

@@ -1,4 +1,4 @@
-use dioxus_core::prelude::*;
+
 
 fn main() {
 

+ 1 - 1
packages/core/examples/html.rs

@@ -68,7 +68,7 @@ impl BasicElement for div {
         todo!()
     }
 
-    fn new(factory: Factory) -> Self {
+    fn new(_factory: Factory) -> Self {
         todo!()
     }
 }

+ 1 - 0
packages/core/src/lib.rs

@@ -1,3 +1,4 @@
+#![allow(non_snake_case, dead_code, unused_must_use, unreachable_code)]
 //! Dioxus Core
 //! ----------
 //!

+ 1 - 1
packages/core/tests/integration.rs

@@ -1,4 +1,4 @@
-use dioxus_core::prelude::*;
+
 // type VirtualNode = VNode;
 
 /// Test a basic usage of a virtual dom + text renderer combo