From 446b10b1cf9ae715cede48a6aacd83a8e346c0f2 Mon Sep 17 00:00:00 2001 From: Maccesch Date: Fri, 23 Feb 2024 02:40:54 +0000 Subject: [PATCH] chore: latest rustfmt --- src/core/element_maybe_signal.rs | 44 ++++++++++++++++---------------- src/use_websocket.rs | 10 ++++---- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/core/element_maybe_signal.rs b/src/core/element_maybe_signal.rs index 0426b3a..7ef0c98 100644 --- a/src/core/element_maybe_signal.rs +++ b/src/core/element_maybe_signal.rs @@ -13,8 +13,8 @@ use std::ops::Deref; /// * a `NodeRef` /// into a function. Used for example in [`use_event_listener`]. pub enum ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { Static(Option), Dynamic(Signal>), @@ -22,8 +22,8 @@ pub enum ElementMaybeSignal } impl Default for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { fn default() -> Self { Self::Static(None) @@ -31,8 +31,8 @@ impl Default for ElementMaybeSignal } impl Clone for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { fn clone(&self) -> Self { match self { @@ -44,8 +44,8 @@ impl Clone for ElementMaybeSignal } impl SignalGet for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { type Value = Option; @@ -67,8 +67,8 @@ impl SignalGet for ElementMaybeSignal } impl SignalWith for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { type Value = Option; @@ -90,8 +90,8 @@ impl SignalWith for ElementMaybeSignal } impl SignalWithUntracked for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { type Value = Option; @@ -113,8 +113,8 @@ impl SignalWithUntracked for ElementMaybeSignal } impl SignalGetUntracked for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { type Value = Option; @@ -138,8 +138,8 @@ impl SignalGetUntracked for ElementMaybeSignal // From static element ////////////////////////////////////////////////////////////// impl From for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { fn from(value: T) -> Self { ElementMaybeSignal::Static(Some(value)) @@ -147,8 +147,8 @@ impl From for ElementMaybeSignal } impl From> for ElementMaybeSignal - where - T: Into + Clone + 'static, +where + T: Into + Clone + 'static, { fn from(target: Option) -> Self { ElementMaybeSignal::Static(target) @@ -174,8 +174,8 @@ impl_from_deref_option!(UseDocument, web_sys::Document); // From string (selector) /////////////////////////////////////////////////////////////// impl<'a, E> From<&'a str> for ElementMaybeSignal - where - E: From + 'static, +where + E: From + 'static, { fn from(target: &'a str) -> Self { cfg_if! { if #[cfg(feature = "ssr")] { @@ -188,8 +188,8 @@ impl<'a, E> From<&'a str> for ElementMaybeSignal } impl From for ElementMaybeSignal - where - E: From + 'static, +where + E: From + 'static, { fn from(target: String) -> Self { Self::from(target.as_str()) diff --git a/src/use_websocket.rs b/src/use_websocket.rs index 8d1cae0..01e2348 100644 --- a/src/use_websocket.rs +++ b/src/use_websocket.rs @@ -508,11 +508,11 @@ impl Default for UseWebSocketOptions { /// Return type of [`use_websocket`]. #[derive(Clone)] pub struct UseWebsocketReturn - where - OpenFn: Fn() + Clone + 'static, - CloseFn: Fn() + Clone + 'static, - SendFn: Fn(&str) + Clone + 'static, - SendBytesFn: Fn(Vec) + Clone + 'static, +where + OpenFn: Fn() + Clone + 'static, + CloseFn: Fn() + Clone + 'static, + SendFn: Fn(&str) + Clone + 'static, + SendBytesFn: Fn(Vec) + Clone + 'static, { /// The current state of the `WebSocket` connection. pub ready_state: Signal,