Update serde to 0.8.x?
Closed this issue · 1 comments
mre commented
Hi,
I've tried using ease with the following example:
#![feature(custom_derive, plugin)]
#![plugin(serde_macros)]
extern crate serde;
extern crate serde_json;
extern crate ease;
use ease::{Url, Request};
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MyResponse {
ok: bool
}
fn main() {
let url = Url::parse("www.example.com").unwrap();
let response = Request::new(url).get();
let payload = match response {
Ok(payload) => payload,
Err(e) => panic!("{}", "aaargh")
};
payload.from_json::<MyResponse>();
}
My Cargo.toml:
[package]
name = "ease-test"
version = "0.1.0"
[dependencies]
ease = "*"
serde_json = "0.8.1"
serde_macros = "*"
serde = "*"
Unfortunately I get a compile error:
error[E0277]: the trait bound `MyResponse: serde::de::Deserialize` is not satisfied
--> src/main.rs:20:13
|
20 | payload.from_json::<MyResponse>();
| ^^^^^^^^^
On the rust irc channel people suggested to upgrade the serde dependency of ease.
Do you think that would resolve the issue? If so, could you upgrade
SimonTeixidor commented
You're in luck, someone made a pull request updating the serde dependency earlier today! I just forgot to publish a new version. Your code now builds on my machine. Thanks for this reminder to bump the version on crates.io 😄