Skip to content

Commit

Permalink
replace \n -> " "
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed May 3, 2024
1 parent fa5ad8e commit 2d59e50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion promkit/src/core/listbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ impl<T: fmt::Display> FromIterator<T> for Listbox {
/// and collected into a `Vec<String>`.
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
Self(Cursor::new(
iter.into_iter().map(|e| format!("{}", e)).collect(),
iter.into_iter()
.map(|e| format!("{}", e).replace('\n', " "))
.collect(),
0,
false,
))
Expand Down

0 comments on commit 2d59e50

Please sign in to comment.