refac(cmd/push): change split to lines

This commit is contained in:
Dmitriy Pleshevskiy 2021-12-24 17:15:21 +03:00
parent 25ea845448
commit 7bf0ab43a2
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ impl StreamCommand for PushCommand<'_> {
}
fn remove_multiline(text: &str) -> String {
text.split('\n')
text.lines()
.enumerate()
.fold(String::new(), |mut acc, (i, line)| {
if i != 0 && !line.is_empty() && !acc.is_empty() && !acc.ends_with(' ') {