Compare commits

...

2 Commits

Author SHA1 Message Date
Greg Johnston
61cd68314f cargo fmt 2023-07-02 17:23:00 -04:00
Martin
90470a6f2d Minor: Ran cargo clippy --fix. 2023-07-02 17:22:39 -04:00
2 changed files with 7 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ where
let child = DynChild::new({
#[cfg(not(any(feature = "csr", feature = "hydrate")))]
let current_id = current_id.clone();
let current_id = current_id;
let children = Rc::new(orig_children(cx).into_view(cx));
#[cfg(not(any(feature = "csr", feature = "hydrate")))]
@@ -94,10 +94,10 @@ where
// run the child; we'll probably throw this away, but it will register resource reads
//let after_original_child = HydrationCtx::peek();
let initial = {
{
// no resources were read under this, so just return the child
if context.pending_resources.get() == 0 {
HydrationCtx::continue_from(current_id.clone());
HydrationCtx::continue_from(current_id);
DynChild::new({
let children = Rc::clone(&children);
move || (*children).clone()
@@ -115,9 +115,7 @@ where
{
let orig_children = Rc::clone(&orig_children);
move || {
HydrationCtx::continue_from(
current_id.clone(),
);
HydrationCtx::continue_from(current_id);
DynChild::new({
let orig_children =
orig_children(cx).into_view(cx);
@@ -132,9 +130,7 @@ where
{
let orig_children = Rc::clone(&orig_children);
move || {
HydrationCtx::continue_from(
current_id.clone(),
);
HydrationCtx::continue_from(current_id);
DynChild::new({
let orig_children =
orig_children(cx).into_view(cx);
@@ -149,9 +145,7 @@ where
// return the fallback for now, wrapped in fragment identifier
fallback().into_view(cx)
}
};
initial
}
}
}
})

View File

@@ -296,7 +296,7 @@ fn ooo_body_stream_recurse(
fragments.chain(resources).chain(
futures::stream::once(async move {
let pending = cx.pending_fragments();
if pending.len() > 0 {
if !pending.is_empty() {
let fragments = FuturesUnordered::new();
let serializers = cx.serialization_resolvers();
for (fragment_id, data) in pending {