feat(fn): edit function signature
This commit is contained in:
parent
bf7f542df0
commit
2ce75224fa
|
@ -6,8 +6,9 @@ use std::ops::Deref;
|
|||
|
||||
const ASCII_ZERO_CHAR_POSITION: u8 = 48;
|
||||
|
||||
pub fn processing_input(input: &String) -> String {
|
||||
pub fn processing_input(input: impl Into<String>) -> String {
|
||||
input
|
||||
.into()
|
||||
.split_ascii_whitespace()
|
||||
.filter(|&x| !x.is_empty())
|
||||
.fold(String::new(), |c: String, n: &str| c + n)
|
||||
|
@ -20,8 +21,9 @@ pub fn from_vec_bits_to_string(raw_data: &[u8]) -> String {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn from_string_to_vec_bits(raw_data: String) -> Vec<u8> {
|
||||
pub fn from_string_to_vec_bits(raw_data: impl Into<String>) -> Vec<u8> {
|
||||
raw_data
|
||||
.into()
|
||||
.as_bits::<Lsb0>()
|
||||
.iter()
|
||||
.step_by(8)
|
||||
|
|
Loading…
Reference in New Issue