mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
1c0d076e41
commit
d1cd4f4c79
1 changed files with 3 additions and 5 deletions
|
|
@ -18,13 +18,11 @@ pub struct Pick {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pick {
|
impl Pick {
|
||||||
|
#[inline]
|
||||||
|
pub fn title(&self) -> &str { &self.title }
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn window(&self) -> impl Iterator<Item = (usize, &str)> {
|
pub fn window(&self) -> impl Iterator<Item = (usize, &str)> {
|
||||||
self.items.iter().map(AsRef::as_ref).enumerate().skip(self.offset).take(self.limit())
|
self.items.iter().map(AsRef::as_ref).enumerate().skip(self.offset).take(self.limit())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pick {
|
|
||||||
#[inline]
|
|
||||||
pub fn title(&self) -> &str { &self.title }
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue