FIXED: clearing inputs bug

This commit is contained in:
2024-04-17 00:06:56 +04:00
parent a58110a3f8
commit 37a8dfb66b
4 changed files with 5 additions and 4 deletions

View File

@@ -36,7 +36,10 @@ pub fn processing_input(input: &String) -> String {
}
pub fn check_correct_input(input: &String, prepared_input: &String, l: usize) -> (bool, bool) {
let first_condition = input.chars().all(|c| c == '1' || c == '0' || c == ' ');
let first_condition = input
.as_str()
.chars()
.all(|c| c == '1' || c == '0' || c == ' ');
let second_condition = prepared_input.len() % l == 0;