Updated utilities module
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// mod utilities {
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Checks {
|
||||
}
|
||||
|
||||
impl Checks {
|
||||
// TODO: Implement
|
||||
pub fn is_number(val: &String) -> bool {
|
||||
return false;
|
||||
return val.is_numeric();
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
@@ -24,4 +21,3 @@ impl Checks {
|
||||
return String::from("");
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// mod utilities {
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Conversions {
|
||||
}
|
||||
|
||||
impl Conversions {
|
||||
// TODO: Implement
|
||||
pub fn to_lower_char(val: &mut String) {
|
||||
pub fn to_lower_char(val: &mut char) {
|
||||
if val.is_alphabetic() {
|
||||
val = val.to_lowercase();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
pub fn initialize_values(&self) {
|
||||
}
|
||||
|
||||
// TODO: Implement
|
||||
pub fn print_value(&self, val: i32) {
|
||||
pub fn print_value<T>(&self, val: T) {
|
||||
println!("Going to print value");
|
||||
println!("{}", val);
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
Reference in New Issue
Block a user