要试验Hyper,我从the GET example开始。除此之外的事实,例如没有编译(no method `get` in `client`
)我已经蒸我的问题一行:无法创建hyper :: Client,因为编译器无法推断出足够的类型信息
fn temp() {
let client = Client::new();
}
此代码不能编译:
unable to infer enough type information about `_`; type annotations or generic parameter binding required [E0282]
我为自己尝试了这一点,无法重现错误。你在文件中有'extern crate hyper;'和'hyper hyper :: Client'吗?这是我的工作版本:http://play.integer32.com/?gist=4debd4812508baf255f21715fbf44ef0 –
将您的代码粘贴到我的main.rs.相同的错误 –
好的。当我使用hyper-from-lang回购时,编译时,当我使用超级回购hyper时,{hyper = {git =“https://github.com/hyperium/hyper”} 这不会被编译。这也许可以解释为什么... –