FIx: cargo fix to clean up things

This commit is contained in:
Jonathan Kelley committed 2021-03-10 19:42:31 -05:00
1 parent 29751a4bab
commit 78d093a945
23 files changed
+91 -101

No files matched your search

+4 -4
View File
@@ -7,7 +7,7 @@
fn main() {}
use std::fmt::Debug;
use dioxus_core::prelude::*;
@@ -22,7 +22,7 @@ struct ListItem {
}
fn app(ctx: Context, props: &Props) -> DomTree {
let (f, setter) = use_state(&ctx, || 0);
let (_f, setter) = use_state(&ctx, || 0);
ctx.render(move |c| {
let mut root = builder::ElementBuilder::new(c, "div");
@@ -64,7 +64,7 @@ struct ChildProps<'a> {
}
impl PartialEq for ChildProps<'_> {
fn eq(&self, other: &Self) -> bool {
fn eq(&self, _other: &Self) -> bool {
// assume the dyn fn is never stable -
// wrap with use_callback if it's an issue for you
false
@@ -78,7 +78,7 @@ impl<'a> Properties for ChildProps<'a> {
}
}
fn ChildItem(ctx: Context, props: &ChildProps) -> DomTree {
fn ChildItem(_ctx: Context, _props: &ChildProps) -> DomTree {
todo!()
// ctx.render(rsx! {
// div {
+4 -4
View File
@@ -1,10 +1,10 @@
use dioxus_core::component::fc_to_builder;
use dioxus_core::prelude::*;
use dioxus_core_macro::fc;
use std::marker::PhantomData;
static BLAH: FC<()> = |ctx, props| {
static BLAH: FC<()> = |ctx, _props| {
let g = "asd".to_string();
ctx.render(rsx! {
div {
@@ -20,7 +20,7 @@ pub struct ExampleProps {
some_field: String,
}
static SomeComponent: FC<ExampleProps> = |ctx, props| {
static SomeComponent: FC<ExampleProps> = |ctx, _props| {
ctx.render(rsx! {
div { }
})
+4 -4
View File
@@ -1,16 +1,16 @@
// #[macro_use]
extern crate fstrings;
use bumpalo::collections::String;
// use dioxus_core::ifmt;
// use fstrings::format_args_f;
use bumpalo::core_alloc::fmt::Write;
fn main() {
let bump = bumpalo::Bump::new();
let b = &bump;
let world = "123";
let _b = &bump;
let _world = "123";
// dioxus_core::ifmt!(in b; "Hello {world}";);
}
+1 -1
View File
@@ -14,7 +14,7 @@ struct SomeProps {
fn main() {
let g: SomeProps = SomeProps::builder().a(10).b(10).build();
let r = g.b.unwrap_or_else(|| 10);
let _r = g.b.unwrap_or_else(|| 10);
}
fn auto_into_some() {}
+4 -4
View File
@@ -1,4 +1,4 @@
use bumpalo::Bump;
use dioxus_core::prelude::*;
fn main() {}
@@ -26,8 +26,8 @@ struct Button<'a> {
}
impl Render for Button<'_> {
fn render(ctx: Context, props: &Self) -> DomTree {
let onfocus = move |evt: ()| log::debug!("Focused");
fn render(ctx: Context, _props: &Self) -> DomTree {
let _onfocus = move |_evt: ()| log::debug!("Focused");
// todo!()
ctx.render(rsx! {
@@ -35,7 +35,7 @@ impl Render for Button<'_> {
// ..props.attrs,
class: "abc123",
// style: { a: 2, b: 3, c: 4 },
onclick: move |evt| {
onclick: move |_evt| {
// log::info("hello world");
},
// Custom1 { a: 123 }
+1 -1
View File
@@ -3,7 +3,7 @@ use dioxus_core::{component::Properties, prelude::*};
fn main() -> Result<(), ()> {
let p1 = SomeProps { name: "bob".into() };
let mut vdom = VirtualDom::new_with_props(Example, p1);
let _vdom = VirtualDom::new_with_props(Example, p1);
Ok(())
}