From cedb84482634f60b68d4c73ccc2622fdf66af623 Mon Sep 17 00:00:00 2001 From: doryan Date: Thu, 15 Aug 2024 23:31:09 +0400 Subject: [PATCH] fix(processing bug): add '\n' string literal to avoid rejecting the right input binary code with a break line --- src/controller/view_utils/input_utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/view_utils/input_utils.rs b/src/controller/view_utils/input_utils.rs index 921ff42..1e4eb5e 100644 --- a/src/controller/view_utils/input_utils.rs +++ b/src/controller/view_utils/input_utils.rs @@ -9,8 +9,8 @@ const ASCII_ZERO_CHAR_POSITION: u8 = 48; pub fn processing_input(input: impl Into) -> String { input .into() - .split_ascii_whitespace() - .filter(|&x| !x.is_empty()) + .split(&[' ', '\n'][..]) + .filter(|x| !x.is_empty()) .fold(String::new(), |c: String, n: &str| c + n) }