refactor(example): remove redundant vec![] in user_input example (#26)

Co-authored-by: rhysd <lin90162@yahoo.co.jp>
This commit is contained in:
Orhun Parmaksız 2023-03-25 15:45:28 +02:00 committed by GitHub
parent 4334c71bc7
commit 62930f2821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -183,7 +183,7 @@ fn ui<B: Backend>(f: &mut Frame<B>, app: &App) {
.iter()
.enumerate()
.map(|(i, m)| {
let content = vec![Spans::from(Span::raw(format!("{}: {}", i, m)))];
let content = Spans::from(Span::raw(format!("{}: {}", i, m)));
ListItem::new(content)
})
.collect();