mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 13:22:28 +00:00
optimization
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
parent
23f5d45307
commit
fb527f6281
|
@ -27,8 +27,10 @@ pub fn create_shortcut_list(
|
|||
shortcuts: impl IntoIterator<Item = Shortcut>,
|
||||
render_width: u16,
|
||||
) -> Box<[Line<'static>]> {
|
||||
let hints = shortcuts.into_iter().collect::<Box<[Shortcut]>>();
|
||||
let shortcut_spans: Vec<Vec<Span<'static>>> = hints.iter().map(|h| h.to_spans()).collect();
|
||||
let shortcut_spans: Vec<Vec<Span<'static>>> = shortcuts
|
||||
.into_iter()
|
||||
.map(|h| h.to_spans())
|
||||
.collect();
|
||||
|
||||
let max_shortcut_width = shortcut_spans
|
||||
.iter()
|
||||
|
|
Loading…
Reference in New Issue
Block a user