mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Use first() instead of get(0)
This commit is contained in:
parent
74adbaca73
commit
8e9eed408c
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ struct Opt {
|
|||
impl From<CmdCow> for Opt {
|
||||
fn from(c: CmdCow) -> Self {
|
||||
Self {
|
||||
step: c.get(0).and_then(|d| d.try_into().ok()).unwrap_or_default(),
|
||||
step: c.first().and_then(|d| d.try_into().ok()).unwrap_or_default(),
|
||||
in_operating: c.bool("in-operating"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue