fix(empty string): boolean logic mistake

This commit is contained in:
doryan 2024-08-10 00:38:42 +04:00
parent 6682a66958
commit bf7f542df0

View File

@ -9,7 +9,7 @@ const ASCII_ZERO_CHAR_POSITION: u8 = 48;
pub fn processing_input(input: &String) -> String {
input
.split_ascii_whitespace()
.filter(|&x| x.is_empty())
.filter(|&x| !x.is_empty())
.fold(String::new(), |c: String, n: &str| c + n)
}