We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27beb89 commit 0775c74Copy full SHA for 0775c74
src/elementext.rs
@@ -35,7 +35,14 @@ impl ElementExt for Element {
35
String: PartialEq<K>,
36
{
37
if let Some(child) = self.get_child(k) {
38
- Ok(Some(child.get_text().map(|s| s.to_owned())?))
+ match child.get_text() {
39
+ Err(e) => match e.downcast_ref() {
40
+ // if tag is empty just ignore it
41
+ Some(SVDError::EmptyTag(_, _)) => Ok(None),
42
+ _ => return Err(e),
43
+ },
44
+ Ok(s) => Ok(Some(s.to_owned())),
45
+ }
46
} else {
47
Ok(None)
48
}
0 commit comments