mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-23 21:51:56 +00:00
Remove Cow for 'static &str
Since we are only using borrowed values &str and no owned values there is no need to wrap them in Cow
This commit is contained in:
parent
10352c6254
commit
ae9d58bc57
|
@ -2,7 +2,6 @@ use ratatui::{
|
||||||
style::{Style, Stylize},
|
style::{Style, Stylize},
|
||||||
text::{Line, Span},
|
text::{Line, Span},
|
||||||
};
|
};
|
||||||
use std::borrow::Cow;
|
|
||||||
|
|
||||||
pub struct Shortcut {
|
pub struct Shortcut {
|
||||||
pub key_sequences: Vec<Span<'static>>,
|
pub key_sequences: Vec<Span<'static>>,
|
||||||
|
@ -63,7 +62,7 @@ impl Shortcut {
|
||||||
Self {
|
Self {
|
||||||
key_sequences: key_sequences
|
key_sequences: key_sequences
|
||||||
.iter()
|
.iter()
|
||||||
.map(|s| Span::styled(Cow::<'static, str>::Borrowed(s), Style::default().bold()))
|
.map(|s| Span::styled(*s, Style::default().bold()))
|
||||||
.collect(),
|
.collect(),
|
||||||
desc,
|
desc,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user