From 875d2d5a3a9c90b0f57540efb0db2ec8f73650cb Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Mon, 20 Mar 2023 09:33:58 -0400 Subject: [PATCH] chore: handle unbounded_send warnings --- leptos_dom/src/ssr_in_order.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/leptos_dom/src/ssr_in_order.rs b/leptos_dom/src/ssr_in_order.rs index 087f971..fcf75e3 100644 --- a/leptos_dom/src/ssr_in_order.rs +++ b/leptos_dom/src/ssr_in_order.rs @@ -133,7 +133,8 @@ async fn handle_chunks(tx: UnboundedSender, chunks: Vec) { StreamChunk::Sync(sync) => buffer.push_str(&sync), StreamChunk::Async(suspended) => { // add static HTML before the Suspense and stream it down - tx.unbounded_send(std::mem::take(&mut buffer)); + tx.unbounded_send(std::mem::take(&mut buffer)) + .expect("failed to send async HTML chunk"); // send the inner stream let suspended = suspended.await; @@ -142,7 +143,8 @@ async fn handle_chunks(tx: UnboundedSender, chunks: Vec) { } } // send final sync chunk - tx.unbounded_send(std::mem::take(&mut buffer)); + tx.unbounded_send(std::mem::take(&mut buffer)) + .expect("failed to send final HTML chunk"); } impl View {