mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Refactor
This commit is contained in:
parent
27bf3207c4
commit
adf846319a
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
use std::{borrow::Cow, mem, time::Duration};
|
use std::{borrow::Cow, mem, time::Duration};
|
||||||
|
|
||||||
|
use anyhow::bail;
|
||||||
use tokio::pin;
|
use tokio::pin;
|
||||||
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
|
use tokio_stream::{StreamExt, wrappers::UnboundedReceiverStream};
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
@ -67,7 +68,7 @@ impl Tab {
|
||||||
subject: opt.subject.into_owned(),
|
subject: opt.subject.into_owned(),
|
||||||
args: opt.args,
|
args: opt.args,
|
||||||
}),
|
}),
|
||||||
SearchOptVia::None => Result::Err(anyhow::anyhow!("Invalid `search` option")),
|
SearchOptVia::None => bail!("Invalid `via` option for `search` command"),
|
||||||
}?;
|
}?;
|
||||||
|
|
||||||
let rx = UnboundedReceiverStream::new(rx).chunks_timeout(5000, Duration::from_millis(500));
|
let rx = UnboundedReceiverStream::new(rx).chunks_timeout(5000, Duration::from_millis(500));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue