Pārlūkot izejas kodu

Add a new method to element attr named to fix include_mdbook

Jonathan Kelley 11 mēneši atpakaļ
vecāks
revīzija
f76c80bab2
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      packages/rsx/src/attribute.rs

+ 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);