mirror of
https://github.com/leptos-rs/leptos
synced 2024-09-20 14:32:00 +00:00
chore: handle unbounded_send warnings
This commit is contained in:
parent
9d142758ec
commit
875d2d5a3a
1 changed files with 4 additions and 2 deletions
|
@ -133,7 +133,8 @@ async fn handle_chunks(tx: UnboundedSender<String>, chunks: Vec<StreamChunk>) {
|
||||||
StreamChunk::Sync(sync) => buffer.push_str(&sync),
|
StreamChunk::Sync(sync) => buffer.push_str(&sync),
|
||||||
StreamChunk::Async(suspended) => {
|
StreamChunk::Async(suspended) => {
|
||||||
// add static HTML before the Suspense and stream it down
|
// 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
|
// send the inner stream
|
||||||
let suspended = suspended.await;
|
let suspended = suspended.await;
|
||||||
|
@ -142,7 +143,8 @@ async fn handle_chunks(tx: UnboundedSender<String>, chunks: Vec<StreamChunk>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// send final sync chunk
|
// 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 {
|
impl View {
|
||||||
|
|
Loading…
Reference in a new issue