mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-01 06:54:23 +00:00
Applied clippy optimizations
This commit is contained in:
1 file changed
+2
-2
@@ -160,7 +160,7 @@ async fn read_pdf(file_path: &str) -> Result<ChunkStream> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (i, page) in doc.pages().iter().enumerate() {
|
for (i, page) in doc.pages().iter().enumerate() {
|
||||||
let content = match page.text().and_then(|t| Ok(t.all())) {
|
let content = match page.text().map(|t| t.all()) {
|
||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let _ = tx.blocking_send(Err(e.into()));
|
let _ = tx.blocking_send(Err(e.into()));
|
||||||
@@ -231,7 +231,7 @@ async fn convert_with_pandoc(
|
|||||||
) -> Result<ChunkStream> {
|
) -> Result<ChunkStream> {
|
||||||
let output = Command::new("pandoc")
|
let output = Command::new("pandoc")
|
||||||
.arg(file_path)
|
.arg(file_path)
|
||||||
.args(&["-f", from, "-t", to])
|
.args(["-f", from, "-t", to])
|
||||||
.output()
|
.output()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user