chore: clear warnings

This commit is contained in:
Greg Johnston 2024-07-12 11:11:32 -04:00
parent efd060c955
commit 04c67cb8b6
5 changed files with 8 additions and 45 deletions

View File

@ -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::{

View File

@ -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)]

View File

@ -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"))]
{

View File

@ -112,40 +112,6 @@ where
}
}
pub struct RenderEffectFallibleState<T, E>
where
T: 'static,
E: 'static,
{
effect: Option<RenderEffect<Result<T, E>>>,
}
impl<T, E, R> Mountable<R> for RenderEffectFallibleState<T, E>
where
T: Mountable<R>,
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<R>) -> bool {
if let Some(inner) = &self.effect {
inner.insert_before_this(child)
} else {
false
}
}
}
impl<F, V, R> RenderHtml<R> for F
where
F: ReactiveFunction<Output = V>,

View File

@ -204,7 +204,7 @@ pub enum StreamChunk {
}
#[derive(Debug)]
struct OooChunk {
pub struct OooChunk {
id: String,
chunks: VecDeque<StreamChunk>,
replace: bool,