From 7bf0ab43a2275fcc814173408edc311ed58c015b Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 24 Dec 2021 17:15:21 +0300 Subject: [PATCH] refac(cmd/push): change split to lines --- src/commands/push.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/push.rs b/src/commands/push.rs index 2c2ee38..aa09825 100644 --- a/src/commands/push.rs +++ b/src/commands/push.rs @@ -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(' ') {