0

Please help, I got this serde not implemented for trait error when i am trying out odbc_iter example

    let row = db.query::<ValueRow>("SELECT 'hello world', CAST(42 AS INTEGER), CAST(10000000 AS BIGINT)")
    .expect("failed to run query").single().expect("failed to fetch row");  

    println!("{}", serde_json::to_string(&row).expect("failed to serialize"));

error[E0277]: the trait bound odbc_iter::value::Value: serde::ser::Serialize is not satisfied --> src\main.rs:94:42

yih lim
  • 13
  • 3
  • Are you sure that you're using the same Serde version in both libraries? – Kotauskas Jun 21 '20 at 09:44
  • Hello Kotauskas, my toml file: [dependencies] odbc-iter="0.2.5" serde="1.0.114" serde_json="1.0.55" – yih lim Jun 22 '20 at 06:11
  • `serde_json` seems to have `default-features = false` for Serde. Try replacing `serde = "1.0.114"` with `serde = {version = "1.0.110", default-features = false}`, that's the exact line from `serde_json`'s manifest. – Kotauskas Jun 22 '20 at 10:51

0 Answers0