mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 08:19:47 +00:00
Applied clippy optimizations
This commit is contained in:
parent
d9c6574093
commit
6495e87d83
@ -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?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user