feat(condition): remove unnecessary condition

This commit is contained in:
doryan 2024-08-15 23:24:52 +04:00
parent 11ba24d7ed
commit f78001167a
2 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,6 @@ pub fn start_hamming_algorithm(input: &TextView, state: bool) -> Result<String>
pub fn check_correct_binary_code(input: &str, prepared_input: &str, l: usize) -> (bool, bool) {
let first_condition: bool = prepared_input.len() % l == 0;
let second_condition: bool = input.chars().all(|c| c == '1' || c == '0' || c == ' ');
(first_condition, second_condition)
}

View File

@ -6,3 +6,4 @@ use crate::{
};
use gtk::{prelude::*, *};
let second_condition: bool = prepared_input.chars().all(|c| c == '1' || c == '0');