xml - Where does the OwnedName type come from? -
i trying parse xml file in rust using rust-xml , having trouble matching on name of tag:
for e in parser.events() { match e { xmlevent::startelement { name, attributes: _, namespace: _ } => { match name { "lexicalentry" => {
this error message getting:
enter codesrc/main.rs|127 col 21| 127:35 error: mismatched types: || expected `xml::name::ownedname`, || found `&'static str` || (expected struct `xml::name::ownedname`, || found &-ptr) [e0308] || src/main.rs:127 "lexicalentry" => { || ^~~~~~~~~~~~~~ here
i find surprising because ownedname identifier doesn't show anywhere in code or dependencies project (including rust sources!):
$ rgrep ownedname . binary file ./woordenboek/src/.main.rs.swp matches ./woordenboek/src/main.rs:
//xml::name::ownedname("lexicalentry") => { binary file ./woordenboek/target/debug/deps/libxml-5882f08ff8adc5e5.rlib matches
where ownedname type i'm supposed match against coming from? compiler inventing type , inserting xml library reason?
xml::name::ownedname
type of name
field of xmlevent::startelement
variant, not &'static str
(a string literal).
Comments
Post a Comment