chore: clear warnings
This commit is contained in:
parent
efd060c955
commit
04c67cb8b6
|
@ -2,7 +2,7 @@ use crate::{
|
||||||
children::{TypedChildren, ViewFnOnce},
|
children::{TypedChildren, ViewFnOnce},
|
||||||
IntoView,
|
IntoView,
|
||||||
};
|
};
|
||||||
use futures::{select, FutureExt, StreamExt};
|
use futures::{select, FutureExt};
|
||||||
use hydration_context::SerializedDataId;
|
use hydration_context::SerializedDataId;
|
||||||
use leptos_macro::component;
|
use leptos_macro::component;
|
||||||
use reactive_graph::{
|
use reactive_graph::{
|
||||||
|
@ -13,7 +13,7 @@ use reactive_graph::{
|
||||||
effect::RenderEffect,
|
effect::RenderEffect,
|
||||||
owner::{provide_context, use_context, Owner},
|
owner::{provide_context, use_context, Owner},
|
||||||
signal::ArcRwSignal,
|
signal::ArcRwSignal,
|
||||||
traits::{Get, GetUntracked, Read, Track, With},
|
traits::{Get, Read, Track, With},
|
||||||
};
|
};
|
||||||
use slotmap::{DefaultKey, SlotMap};
|
use slotmap::{DefaultKey, SlotMap};
|
||||||
use tachys::{
|
use tachys::{
|
||||||
|
|
|
@ -247,7 +247,7 @@ impl TimeoutHandle {
|
||||||
/// Executes the given function after the given duration of time has passed.
|
/// Executes the given function after the given duration of time has passed.
|
||||||
/// [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout).
|
/// [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout).
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
any(feature = "tracing", feature = "ssr"),
|
feature = "tracing",
|
||||||
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
||||||
)]
|
)]
|
||||||
pub fn set_timeout(cb: impl FnOnce() + 'static, 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.
|
/// 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).
|
/// [`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout).
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
any(feature = "tracing", feature = "ssr"),
|
feature = "tracing",
|
||||||
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
||||||
)]
|
)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -381,7 +381,7 @@ impl IntervalHandle {
|
||||||
/// returning a cancelable handle.
|
/// returning a cancelable handle.
|
||||||
/// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval).
|
/// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval).
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
any(feature = "tracing", feature = "ssr"),
|
feature = "tracing",
|
||||||
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
||||||
)]
|
)]
|
||||||
pub fn set_interval(cb: impl Fn() + 'static, 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.
|
/// returning a cancelable handle.
|
||||||
/// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval).
|
/// See [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval).
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
any(feature = "tracing", feature = "ssr"),
|
feature = "tracing",
|
||||||
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
instrument(level = "trace", skip_all, fields(duration = ?duration))
|
||||||
)]
|
)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|
|
@ -234,10 +234,7 @@ where
|
||||||
if FROM_SERVER {
|
if FROM_SERVER {
|
||||||
(self.hydrate_from_server)(self.value, el)
|
(self.hydrate_from_server)(self.value, el)
|
||||||
} else {
|
} else {
|
||||||
panic!(
|
(self.hydrate_from_template)(self.value, el)
|
||||||
"hydrating AnyAttribute from inside a ViewTemplate is not \
|
|
||||||
supported."
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "hydrate"))]
|
#[cfg(not(feature = "hydrate"))]
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
impl<F, V, R> RenderHtml<R> for F
|
||||||
where
|
where
|
||||||
F: ReactiveFunction<Output = V>,
|
F: ReactiveFunction<Output = V>,
|
||||||
|
|
|
@ -204,7 +204,7 @@ pub enum StreamChunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct OooChunk {
|
pub struct OooChunk {
|
||||||
id: String,
|
id: String,
|
||||||
chunks: VecDeque<StreamChunk>,
|
chunks: VecDeque<StreamChunk>,
|
||||||
replace: bool,
|
replace: bool,
|
||||||
|
|
Loading…
Reference in New Issue