1
0
Эх сурвалжийг харах

Add a new method to element attr named to fix include_mdbook

Jonathan Kelley 11 сар өмнө
parent
commit
f76c80bab2

+ 6 - 0
packages/rsx/src/attribute.rs

@@ -97,6 +97,12 @@ pub struct ElementAttrNamed {
     pub attr: ElementAttr,
 }
 
+impl ElementAttrNamed {
+    pub fn new(el_name: ElementName, attr: ElementAttr) -> Self {
+        Self { el_name, attr }
+    }
+}
+
 impl Hash for ElementAttrNamed {
     fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
         self.attr.name.hash(state);