diff --git a/src/controller/controller.rs b/src/controller/controller.rs index d1b912c..1e5dd78 100644 --- a/src/controller/controller.rs +++ b/src/controller/controller.rs @@ -8,4 +8,3 @@ pub fn state_controller(switch: &Switch, label: &Label) -> () { label.set_label("Режим: кодирование"); } } - diff --git a/src/controller/view_utils/input_utils.rs b/src/controller/view_utils/input_utils.rs index 9b6a37d..d17ed71 100644 --- a/src/controller/view_utils/input_utils.rs +++ b/src/controller/view_utils/input_utils.rs @@ -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; diff --git a/src/view/components/input.rs b/src/view/components/input.rs index 652d9b3..9dd4060 100644 --- a/src/view/components/input.rs +++ b/src/view/components/input.rs @@ -81,4 +81,3 @@ impl InputBuilder { } } } - diff --git a/src/view/pages/hamming_code.rs b/src/view/pages/hamming_code.rs index 36b4e68..7a4f0de 100644 --- a/src/view/pages/hamming_code.rs +++ b/src/view/pages/hamming_code.rs @@ -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