Use the existing futures-util dependency for media streaming

This commit is contained in:
archipelago
2026-10-05 23:57:12 -04:00
parent bf7fb425eb
commit 104e0601ff
+1 -1
View File
@@ -58,7 +58,7 @@ pub async fn file_response(
.map(|(start, end)| (start, end - start + 1)) .map(|(start, end)| (start, end - start + 1))
.unwrap_or((0, total)); .unwrap_or((0, total));
file.seek(std::io::SeekFrom::Start(start)).await?; file.seek(std::io::SeekFrom::Start(start)).await?;
let chunks = futures::stream::try_unfold((file, length), |(mut file, left)| async move { let chunks = futures_util::stream::try_unfold((file, length), |(mut file, left)| async move {
if left == 0 { if left == 0 {
return Ok::<_, std::io::Error>(None); return Ok::<_, std::io::Error>(None);
} }