Closed conopt closed 8 years ago
Hi. I could not reproduce this. Which version of kuchiki are you using? How are you compiling the example? With the latest master (which is 0.3.0 on crates.io), cargo run --example hyper
should print a compiler warning and do nothing:
Compiling kuchiki v0.3.0 (file:///…/kuchiki)
examples/hyper.rs:7:9: 7:28 warning: unused import, #[warn(unused_imports)] on by default
examples/hyper.rs:7 use kuchiki::traits::*; // This file requires the `hyper` feature to be enabled
^~~~~~~~~~~~~~~~~~~
Running `target/debug/examples/hyper`
With cargo run --example hyper --features hyper
it should compile correctly (though at the moment it’s buggy and panics at runtime, I’m not sure why).
I’ve fixed the runtime error in 7398a604d8622c2a2612e69a732fdcc3ecc18967.
Hi. Here are the steps to reproduce:
cargo run --features hyper
rust version: 1.6.0 kuchiki version: 0.3.0 system version: Mac OS X 10.11.
Could you copy/paste your Cargo.toml
file? What’s important is the hyper
for kuchiki, not for your own crate. You can enable it with:
[dependencies]
kuchiki = {version = "0.3", features = ["hyper"]}
Oh! Sorry for that. I didn't enable hyper for kuchiki. Thanks for your help!
I’ve expanded the docs a bit, although admittedly they’re still not easily discoverable: https://simonsapin.github.io/kuchiki/kuchiki/traits/trait.ParserExt.html
tried to compile examples/hyper.rs, got error: no method named
from_http
found for typehtml5ever::driver::Parser<kuchiki::parser::Sink>
in the current scope.