diff --git a/01.workspace/heave/src/imp/entity_from_value.rs b/01.workspace/heave/src/imp/entity_from_value.rs deleted file mode 100644 index 59ee4ef..0000000 --- a/01.workspace/heave/src/imp/entity_from_value.rs +++ /dev/null @@ -1,20 +0,0 @@ -use crate::*; - -impl From for Entity { - fn from(value: Value) -> Entity { - let id = match value { - Value::Text(value) => value, - _ => panic!("Type mismatch"), - }; - Entity { - id, - ref_date: None, - state: EntityState::Unknown, - class: String::new(), - attributes: std::collections::HashMap::new(), - } - } -} - -// #[cfg(test)] -// mod unit_tests { use super::*; } diff --git a/01.workspace/heave/src/imp/mod.rs b/01.workspace/heave/src/imp/mod.rs index e9243e7..25558a2 100644 --- a/01.workspace/heave/src/imp/mod.rs +++ b/01.workspace/heave/src/imp/mod.rs @@ -1,18 +1,9 @@ pub mod bool_from_value; -// pub mod bool_to_value; -pub mod entity_from_value; -// pub mod entity_to_value; pub mod f64_from_value; -// pub mod f64_to_value; pub mod i64_from_value; -// pub mod i64_to_value; -// pub mod str_to_value; pub mod string_from_value; -// pub mod string_to_value; pub mod u64_from_value; -// pub mod u64_to_value; pub mod value_from_bool; -pub mod value_from_entity; pub mod value_from_f64; pub mod value_from_i64; pub mod value_from_str; diff --git a/01.workspace/heave/src/imp/value_from_entity.rs b/01.workspace/heave/src/imp/value_from_entity.rs deleted file mode 100644 index 67e9402..0000000 --- a/01.workspace/heave/src/imp/value_from_entity.rs +++ /dev/null @@ -1,10 +0,0 @@ -use crate::*; - -impl From for Value { - fn from(value: Entity) -> Self { - Self::Text(value.id) - } -} - -// #[cfg(test)] -// mod unit_tests { use super::*; } diff --git a/01.workspace/heave/src/str/entity.rs b/01.workspace/heave/src/str/entity.rs index 797ef01..64a3eb9 100644 --- a/01.workspace/heave/src/str/entity.rs +++ b/01.workspace/heave/src/str/entity.rs @@ -9,12 +9,6 @@ pub struct O { pub attributes: std::collections::HashMap, } -impl EAV for Entity { - fn class() -> &'static str { - "entity" - } -} - impl O { pub fn new() -> Self where