FIXED: clearing inputs bug

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

View File

@ -8,4 +8,3 @@ pub fn state_controller(switch: &Switch, label: &Label) -> () {
label.set_label("Режим: кодирование");
}
}

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;

View File

@ -81,4 +81,3 @@ impl InputBuilder {
}
}
}

View File

@ -81,7 +81,7 @@ pub fn hamming_code_page(wrapper: &Box) -> () {
let text_view_output_for_output = hamming_text_view_output.clone();
let text_view_input_for_clearing = hamming_text_view_input.clone();
let text_view_output_for_clearing = hamming_text_view_input.clone();
let text_view_output_for_clearing = hamming_text_view_output.clone();
// actions