diff --git a/examples/cargo-make/common.toml b/examples/cargo-make/common.toml index 67a3d52d6..e99adc53e 100644 --- a/examples/cargo-make/common.toml +++ b/examples/cargo-make/common.toml @@ -1,3 +1,6 @@ +[env] +CARGO_MAKE_CLIPPY_ARGS = "--all-targets -- -D warnings" + [tasks.check-style] description = "Check for style violations" dependencies = ["check-format-flow", "clippy-flow"] diff --git a/examples/counter/src/lib.rs b/examples/counter/src/lib.rs index 6e0b84bb2..3320b9824 100644 --- a/examples/counter/src/lib.rs +++ b/examples/counter/src/lib.rs @@ -1,7 +1,7 @@ use leptos::*; /// A simple counter component. -/// +/// /// You can use doc comments like this to document your component. #[component] pub fn SimpleCounter( @@ -9,7 +9,7 @@ pub fn SimpleCounter( /// The starting value for the counter initial_value: i32, /// The change that should be applied each time the button is clicked. - step: i32 + step: i32, ) -> impl IntoView { let (value, set_value) = create_signal(cx, initial_value); diff --git a/examples/counter/src/main.rs b/examples/counter/src/main.rs index 6dbb4b4fc..ab4542566 100644 --- a/examples/counter/src/main.rs +++ b/examples/counter/src/main.rs @@ -4,10 +4,12 @@ use leptos::*; pub fn main() { _ = console_log::init_with_level(log::Level::Debug); console_error_panic_hook::set_once(); - mount_to_body(|cx| view! { cx, - + mount_to_body(|cx| { + view! { cx, + + } }) } diff --git a/examples/counter/tests/web.rs b/examples/counter/tests/web.rs index 7c6ac33b3..0d15beb3f 100644 --- a/examples/counter/tests/web.rs +++ b/examples/counter/tests/web.rs @@ -9,7 +9,7 @@ wasm_bindgen_test_configure!(run_in_browser); fn clear() { let document = leptos::document(); let test_wrapper = document.create_element("section").unwrap(); - document.body().unwrap().append_child(&test_wrapper); + let _ = document.body().unwrap().append_child(&test_wrapper); // start by rendering our counter and mounting it to the DOM // note that we start at the initial value of 10 @@ -38,7 +38,7 @@ fn clear() { // test case run_scope(create_runtime(), |cx| { // it's as if we're creating it with a value of 0, right? - let (value, set_value) = create_signal(cx, 0); + let (value, _set_value) = create_signal(cx, 0); // we can remove the event listeners because they're not rendered to HTML view! { cx, @@ -71,7 +71,7 @@ fn clear() { fn inc() { let document = leptos::document(); let test_wrapper = document.create_element("section").unwrap(); - document.body().unwrap().append_child(&test_wrapper); + let _ = document.body().unwrap().append_child(&test_wrapper); mount_to( test_wrapper.clone().unchecked_into(), @@ -79,7 +79,7 @@ fn inc() { ); // You can do testing with vanilla DOM operations - let document = leptos::document(); + let _document = leptos::document(); let div = test_wrapper.query_selector("div").unwrap().unwrap(); let clear = div .first_child()