FIXED: clearing inputs bug
This commit is contained in:
1 parent
a58110a3f8
commit
37a8dfb66b
4 files changed
+5
-4
No files matched your search
@@ -8,4 +8,3 @@ pub fn state_controller(switch: &Switch, label: &Label) -> () {
|
||||
label.set_label("Режим: кодирование");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user