simplified and removed getters
This commit is contained in:
parent
f5408dfc3d
commit
e731bbd0fb
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ pub struct Value {
|
|||
|
||||
|
||||
impl Value {
|
||||
pub fn get_length(&self) -> u16 {
|
||||
pub fn len(&self) -> u16 {
|
||||
(self.datatype.len() + self.data.len()) as u16
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ pub fn float(value: f64) -> Value {
|
|||
Value { datatype: vec![7], data: buffer.to_vec() }
|
||||
}
|
||||
|
||||
pub fn get_length(value: &Value) -> usize {
|
||||
pub fn len(value: &Value) -> usize {
|
||||
value.datatype.len() + value.data.len()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue