Updated utilities module

This commit is contained in:
kdeng00
2024-04-08 12:36:40 -04:00
parent 269899af07
commit 0307c0254b
2 changed files with 8 additions and 13 deletions
+1 -5
View File
@@ -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("");
}
}
// }
+7 -8
View File
@@ -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);
}
}
// }