mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: Rust panics instead of returning an error when file times are invalid
This commit is contained in:
parent
521c8b6bfe
commit
daf6f04c02
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ impl<'a> From<&'a Exec> for Opt<'a> {
|
|||
}
|
||||
|
||||
impl Completion {
|
||||
fn match_candidates(word: &str, cache: &Vec<String>) -> Vec<String> {
|
||||
fn match_candidates(word: &str, cache: &[String]) -> Vec<String> {
|
||||
let flow = cache.iter().try_fold(
|
||||
(Vec::with_capacity(LIMIT), Vec::with_capacity(LIMIT)),
|
||||
|(mut prefixed, mut fuzzy), s| {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ impl From<Metadata> for Cha {
|
|||
meta: cm,
|
||||
len: m.len(),
|
||||
accessed: m.accessed().ok(),
|
||||
created: m.created().ok(),
|
||||
created: std::panic::catch_unwind(|| m.created().ok()).ok().flatten(),
|
||||
modified: m.modified().ok(),
|
||||
|
||||
#[cfg(unix)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue