minor file updates

This commit is contained in:
Nicholas Orlowsky 2023-08-08 14:55:46 -05:00 committed by Nicholas Orlowsky
parent 7000cdab31
commit dc89387128
6 changed files with 29 additions and 26 deletions

View file

@ -33,11 +33,11 @@ impl Datatype {
// Remove dquotes
str_bytes.remove(0);
str_bytes.remove(str_bytes.len() - 1);
return Ok(str_bytes);
Ok(str_bytes)
}
Datatype::Integer => {
let val = data_val.parse::<u8>()?;
return Ok(vec![val]);
Ok(vec![val])
}
}
}
@ -46,11 +46,11 @@ impl Datatype {
match self {
Datatype::CharacterVarying => {
let str_val = String::from_utf8(data_val.to_vec())?;
return Ok(str_val);
Ok(str_val)
}
Datatype::Integer => {
let val = data_val.first().unwrap();
return Ok(format!("{}", val));
Ok(format!("{}", val))
}
}
}

View file

@ -1,2 +1,2 @@
pub mod table;
pub mod datatypes;
pub mod table;