add toolchain file
This commit is contained in:
parent
71cbc7ca49
commit
d05d45e7ab
2 changed files with 2 additions and 3 deletions
1
rust-toolchain
Normal file
1
rust-toolchain
Normal file
|
@ -0,0 +1 @@
|
||||||
|
nightly
|
|
@ -54,9 +54,7 @@ impl WidgetUse {
|
||||||
}
|
}
|
||||||
pub fn from_xml_node(xml: XmlNode) -> Result<Self> {
|
pub fn from_xml_node(xml: XmlNode) -> Result<Self> {
|
||||||
match xml {
|
match xml {
|
||||||
XmlNode::Text(text) => Ok(WidgetUse::simple_text(AttrValue::Concrete(PrimitiveValue::String(
|
XmlNode::Text(text) => Ok(WidgetUse::simple_text(AttrValue::parse_string(text.text()))),
|
||||||
text.text(),
|
|
||||||
)))),
|
|
||||||
XmlNode::Element(elem) => Ok(WidgetUse {
|
XmlNode::Element(elem) => Ok(WidgetUse {
|
||||||
name: elem.tag_name().to_string(),
|
name: elem.tag_name().to_string(),
|
||||||
children: with_text_pos_context! { elem => elem.children().map(WidgetUse::from_xml_node).collect::<Result<_>>()?}?,
|
children: with_text_pos_context! { elem => elem.children().map(WidgetUse::from_xml_node).collect::<Result<_>>()?}?,
|
||||||
|
|
Loading…
Add table
Reference in a new issue