Skip to content

Commit ae9d58b

Browse files
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
1 parent 10352c6 commit ae9d58b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tui/src/hint.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use ratatui::{
22
style::{Style, Stylize},
33
text::{Line, Span},
44
};
5-
use std::borrow::Cow;
65

76
pub struct Shortcut {
87
pub key_sequences: Vec<Span<'static>>,
@@ -63,7 +62,7 @@ impl Shortcut {
6362
Self {
6463
key_sequences: key_sequences
6564
.iter()
66-
.map(|s| Span::styled(Cow::<'static, str>::Borrowed(s), Style::default().bold()))
65+
.map(|s| Span::styled(*s, Style::default().bold()))
6766
.collect(),
6867
desc,
6968
}

0 commit comments

Comments
 (0)