Browse Source

Remove redundant ClassPropertyValue structure

iorveth 4 years ago
parent
commit
d0621b8f5d

+ 0 - 10
runtime-modules/content-directory/src/lib.rs

@@ -326,16 +326,6 @@ impl Default for PropertyValue {
     }
 }
 
-#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
-#[derive(Encode, Decode, Default, Clone, PartialEq, Eq, Debug)]
-pub struct ClassPropertyValue {
-    /// Index is into properties vector of class.
-    pub in_class_index: u16,
-
-    /// Value of property with index `in_class_index` in a given class.
-    pub value: PropertyValue,
-}
-
 // Shortcuts for faster readability of match expression:
 use PropertyType as PT;
 use PropertyValue as PV;

+ 2 - 2
runtime-modules/content-directory/src/operations.rs

@@ -1,4 +1,4 @@
-use crate::{ClassId, ClassPropertyValue, EntityId, PropertyValue};
+use crate::{ClassId, EntityId, PropertyValue};
 use codec::{Decode, Encode};
 use rstd::collections::btree_map::BTreeMap;
 use rstd::prelude::*;
@@ -124,7 +124,7 @@ pub fn parametrized_property_values_to_property_values(
                 PropertyValue::ReferenceVec(entities)
             }
         };
-        
+
         class_property_values.insert(parametrized_class_property_value.in_class_index, property_value);
     }