From 10d4a2d353d0c9a0a7163da837c6a41d7198606c Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 2 May 2025 15:36:09 +0200 Subject: [PATCH] Renamed read_pdf function to stream_pdf for clarity --- runtime/src/file_data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/file_data.rs b/runtime/src/file_data.rs index b42a4c12..97e27187 100644 --- a/runtime/src/file_data.rs +++ b/runtime/src/file_data.rs @@ -92,7 +92,7 @@ async fn stream_data(file_path: &str) -> Result { _ => match fmt.kind() { Kind::Document => match fmt { - FileFormat::PortableDocumentFormat => read_pdf(file_path).await?, + FileFormat::PortableDocumentFormat => stream_pdf(file_path).await?, FileFormat::MicrosoftWordDocument => { convert_with_pandoc(file_path, "docx", TO_MARKDOWN).await? } @@ -146,7 +146,7 @@ async fn stream_text_file(file_path: &str) -> Result { Ok(Box::pin(stream)) } -async fn read_pdf(file_path: &str) -> Result { +async fn stream_pdf(file_path: &str) -> Result { let path = file_path.to_owned(); let (tx, rx) = mpsc::channel(10);