error[E0308]: mismatched types
--> src/main.rs:135:53
|
135 | let base_tag = NodeRef::new_element(name, ...);
| ^^^^ expected struct `markup5ever::interface::QualName`, found struct `QualName`
|
= note: perhaps two different versions of crate `markup5ever` are being used?
Both of the functions take a QualName parameter. This struct is not re-exported by kuchiki (from html5ever). The only way to create its instance is to use html5ever (or markup5ever, but html5ever just re-exports QualName from markup5ever) . But right now the latest version of html5ever and version of html5ever used in kuchiki are not compatiable.
Here is the output of cargo tree, see that kuchiki and html5ever use different versions:
I think the simple solution would be to re-export QualName from html5ever, then I could use kuchiki::QualName which would definitely be compatible and avoid type mismatch error.
Running into trouble when I want to create a new element NodeRef.
I have tried two ways:
The error I get:
Both of the functions take a QualName parameter. This struct is not re-exported by kuchiki (from html5ever). The only way to create its instance is to use html5ever (or markup5ever, but html5ever just re-exports QualName from markup5ever) . But right now the latest version of html5ever and version of html5ever used in kuchiki are not compatiable.
Here is the output of cargo tree, see that kuchiki and html5ever use different versions:
I think the simple solution would be to re-export QualName from html5ever, then I could use kuchiki::QualName which would definitely be compatible and avoid type mismatch error.