diff --git a/leptos/src/suspense_component.rs b/leptos/src/suspense_component.rs index 3bede47f3..bc40f2b7d 100644 --- a/leptos/src/suspense_component.rs +++ b/leptos/src/suspense_component.rs @@ -2,7 +2,7 @@ use crate::{ children::{TypedChildren, ViewFnOnce}, IntoView, }; -use futures::{select, FutureExt, StreamExt}; +use futures::{select, FutureExt}; use hydration_context::SerializedDataId; use leptos_macro::component; use reactive_graph::{ @@ -13,7 +13,7 @@ use reactive_graph::{ effect::RenderEffect, owner::{provide_context, use_context, Owner}, signal::ArcRwSignal, - traits::{Get, GetUntracked, Read, Track, With}, + traits::{Get, Read, Track, With}, }; use slotmap::{DefaultKey, SlotMap}; use tachys::{ diff --git a/leptos_dom/src/helpers.rs b/leptos_dom/src/helpers.rs index 7961829be..95b66fa30 100644 --- a/leptos_dom/src/helpers.rs +++ b/leptos_dom/src/helpers.rs @@ -247,7 +247,7 @@ impl TimeoutHandle { /// Executes the given function after the given duration of time has passed. /// [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout). #[cfg_attr( - any(feature = "tracing", feature = "ssr"), + feature = "tracing", instrument(level = "trace", skip_all, fields(duration = ?duration)) )] pub fn set_timeout(cb: impl FnOnce() + 'static, duration: Duration) { @@ -257,7 +257,7 @@ pub fn set_timeout(cb: impl FnOnce() + 'static, duration: Duration) { /// Executes the given function after the given duration of time has passed, returning a cancelable handle. /// [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout). #[cfg_attr( - any(feature = "tracing", feature = "ssr"), + feature = "tracing", instrument(level = "trace", skip_all, fields(duration = ?duration)) )] #[inline(always)] @@ -381,7 +381,7 @@ impl IntervalHandle { /// returning a cancelable handle. /// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval). #[cfg_attr( - any(feature = "tracing", feature = "ssr"), + feature = "tracing", instrument(level = "trace", skip_all, fields(duration = ?duration)) )] pub fn set_interval(cb: impl Fn() + 'static, duration: Duration) { @@ -392,7 +392,7 @@ pub fn set_interval(cb: impl Fn() + 'static, duration: Duration) { /// returning a cancelable handle. /// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval). #[cfg_attr( - any(feature = "tracing", feature = "ssr"), + feature = "tracing", instrument(level = "trace", skip_all, fields(duration = ?duration)) )] #[inline(always)] diff --git a/tachys/src/html/attribute/any_attribute.rs b/tachys/src/html/attribute/any_attribute.rs index c7a628551..4bffb473f 100644 --- a/tachys/src/html/attribute/any_attribute.rs +++ b/tachys/src/html/attribute/any_attribute.rs @@ -234,10 +234,7 @@ where if FROM_SERVER { (self.hydrate_from_server)(self.value, el) } else { - panic!( - "hydrating AnyAttribute from inside a ViewTemplate is not \ - supported." - ); + (self.hydrate_from_template)(self.value, el) } #[cfg(not(feature = "hydrate"))] { diff --git a/tachys/src/reactive_graph/mod.rs b/tachys/src/reactive_graph/mod.rs index 1005fcfc0..ec40cdf00 100644 --- a/tachys/src/reactive_graph/mod.rs +++ b/tachys/src/reactive_graph/mod.rs @@ -112,40 +112,6 @@ where } } -pub struct RenderEffectFallibleState -where - T: 'static, - E: 'static, -{ - effect: Option>>, -} - -impl Mountable for RenderEffectFallibleState -where - T: Mountable, - R: Renderer, -{ - fn unmount(&mut self) { - if let Some(ref mut inner) = self.effect { - inner.unmount(); - } - } - - fn mount(&mut self, parent: &R::Element, marker: Option<&R::Node>) { - if let Some(ref mut inner) = self.effect { - inner.mount(parent, marker); - } - } - - fn insert_before_this(&self, child: &mut dyn Mountable) -> bool { - if let Some(inner) = &self.effect { - inner.insert_before_this(child) - } else { - false - } - } -} - impl RenderHtml for F where F: ReactiveFunction, diff --git a/tachys/src/ssr/mod.rs b/tachys/src/ssr/mod.rs index 57bc86812..29ec9582b 100644 --- a/tachys/src/ssr/mod.rs +++ b/tachys/src/ssr/mod.rs @@ -204,7 +204,7 @@ pub enum StreamChunk { } #[derive(Debug)] -struct OooChunk { +pub struct OooChunk { id: String, chunks: VecDeque, replace: bool,