From b5ddeeda9778bc5d8687018d373fd20627b916d1 Mon Sep 17 00:00:00 2001 From: Lukas Potthast Date: Wed, 21 Jun 2023 13:09:00 +0200 Subject: [PATCH] Allow users to use the stable toolchain --- .vscode/settings.json | 5 ++++ Cargo.toml | 3 +-- examples/on_click_outside/rust-toolchain.toml | 2 +- examples/on_click_outside/src/main.rs | 8 +++--- examples/use_abs/rust-toolchain.toml | 2 +- examples/use_abs/src/main.rs | 8 +++--- .../use_active_element/rust-toolchain.toml | 2 +- examples/use_active_element/src/main.rs | 2 +- examples/use_breakpoints/rust-toolchain.toml | 2 +- examples/use_ceil/rust-toolchain.toml | 2 +- examples/use_ceil/src/main.rs | 8 +++--- examples/use_css_var/rust-toolchain.toml | 2 +- examples/use_css_var/src/main.rs | 14 +++++----- examples/use_debounce_fn/rust-toolchain.toml | 2 +- examples/use_debounce_fn/src/main.rs | 4 +-- .../use_element_hover/rust-toolchain.toml | 2 +- examples/use_element_hover/src/main.rs | 2 +- examples/use_element_size/Cargo.toml | 2 +- examples/use_element_size/rust-toolchain.toml | 2 +- .../rust-toolchain.toml | 2 +- .../use_event_listener/rust-toolchain.toml | 2 +- examples/use_event_listener/src/main.rs | 6 ++--- examples/use_favicon/rust-toolchain.toml | 2 +- examples/use_favicon/src/main.rs | 10 +++---- examples/use_floor/rust-toolchain.toml | 2 +- examples/use_floor/src/main.rs | 8 +++--- .../rust-toolchain.toml | 2 +- .../use_intersection_observer/src/main.rs | 4 +-- examples/use_interval/rust-toolchain.toml | 2 +- examples/use_interval_fn/rust-toolchain.toml | 2 +- examples/use_interval_fn/src/main.rs | 12 ++++----- examples/use_media_query/rust-toolchain.toml | 2 +- examples/use_mouse/rust-toolchain.toml | 2 +- .../use_mutation_observer/rust-toolchain.toml | 2 +- examples/use_mutation_observer/src/main.rs | 8 +++--- .../use_resize_observer/rust-toolchain.toml | 2 +- examples/use_resize_observer/src/main.rs | 4 +-- examples/use_round/rust-toolchain.toml | 2 +- examples/use_round/src/main.rs | 8 +++--- examples/use_scroll/rust-toolchain.toml | 2 +- examples/use_scroll/src/main.rs | 26 +++++++++---------- examples/use_storage/rust-toolchain.toml | 2 +- examples/use_storage/src/main.rs | 12 ++++----- examples/use_throttle_fn/rust-toolchain.toml | 2 +- examples/use_throttle_fn/src/main.rs | 4 +-- examples/watch_debounced/rust-toolchain.toml | 2 +- examples/watch_debounced/src/main.rs | 6 ++--- examples/watch_pausable/rust-toolchain.toml | 2 +- examples/watch_pausable/src/main.rs | 12 ++++----- examples/watch_throttled/rust-toolchain.toml | 2 +- examples/watch_throttled/src/main.rs | 6 ++--- rust-toolchain.toml | 2 +- src/docs/boolean_display.rs | 2 +- src/docs/mod.rs | 2 +- src/lib.rs | 2 +- src/math/mod.rs | 1 - src/math/use_abs.rs | 1 - src/math/use_ceil.rs | 1 - src/math/use_floor.rs | 1 - src/math/use_max.rs | 1 - src/math/use_min.rs | 1 - src/math/use_round.rs | 1 - src/storage/shared.rs | 1 - src/storage/use_local_storage.rs | 1 - src/storage/use_session_storage.rs | 1 - src/storage/use_storage.rs | 11 +++----- src/use_active_element.rs | 2 +- src/use_css_var.rs | 4 +-- src/use_element_hover.rs | 6 ++--- src/use_element_size.rs | 20 +++++++------- src/use_element_visibility.rs | 2 +- src/use_event_listener.rs | 2 +- src/use_favicon.rs | 8 +++--- src/use_intersection_observer.rs | 6 ++--- src/use_interval.rs | 4 +-- src/use_interval_fn.rs | 6 ++--- src/use_media_query.rs | 4 +-- src/use_mouse.rs | 16 ++++++------ src/use_mutation_observer.rs | 2 +- src/use_resize_observer.rs | 6 ++--- src/use_scroll.rs | 16 ++++++------ src/use_supported.rs | 2 +- src/watch.rs | 18 ++++++------- src/watch_debounced.rs | 4 +-- src/watch_pausable.rs | 12 ++++----- src/watch_throttled.rs | 4 +-- src/whenever.rs | 8 +++--- 87 files changed, 203 insertions(+), 214 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3f3f094 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "rust-analyzer.linkedProjects": [ + "./examples/use_element_size/Cargo.toml" + ] +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 7812a43..da19569 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,8 @@ readme = "README.md" repository = "https://github.com/Synphonyte/leptos-use" homepage = "https://leptos-use.rs" - [dependencies] -leptos = "0.3.0" +leptos = { version = "0.3", features = ["stable"] } wasm-bindgen = "0.2.86" js-sys = "0.3.63" default-struct-builder = "0.2.1" diff --git a/examples/on_click_outside/rust-toolchain.toml b/examples/on_click_outside/rust-toolchain.toml index 271800c..292fe49 100644 --- a/examples/on_click_outside/rust-toolchain.toml +++ b/examples/on_click_outside/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly" \ No newline at end of file +channel = "stable" diff --git a/examples/on_click_outside/src/main.rs b/examples/on_click_outside/src/main.rs index 2ab7b71..60a42e2 100644 --- a/examples/on_click_outside/src/main.rs +++ b/examples/on_click_outside/src/main.rs @@ -7,15 +7,15 @@ fn Demo(cx: Scope) -> impl IntoView { let (show_modal, set_show_modal) = create_signal(cx, false); let modal_ref = create_node_ref(cx); - let _ = on_click_outside(cx, modal_ref, move |_| set_show_modal(false)); + let _ = on_click_outside(cx, modal_ref, move |_| set_show_modal.set(false)); view! { cx, - + - +