diff --git a/src/services/async_item_service.rs b/src/services/async_item_service.rs index 0b3b991..f2e7a66 100644 --- a/src/services/async_item_service.rs +++ b/src/services/async_item_service.rs @@ -3,9 +3,11 @@ use crate::services::item_service::ItemService; use crate::services::types::{ItemWithContent, ItemWithMeta}; use rusqlite::Connection; use std::collections::HashMap; +use std::io::Read; use std::path::PathBuf; use std::sync::Arc; use tokio::sync::Mutex; +use tokio_util::io::ReaderStream; /// An asynchronous wrapper around the `ItemService` for use in async contexts like the web server. /// It uses `tokio::task::spawn_blocking` to run synchronous database and filesystem operations @@ -207,7 +209,7 @@ impl AsyncItemService { } // Create a stream that reads the content in chunks - let stream = tokio_stream::wrappers::ReaderStream::new(reader); + let stream = ReaderStream::new(reader); // If length is specified, we need to limit the stream let limited_stream = if length > 0 {