These are chat archives for rust-lang/rust

16th
May 2018
Berkus Decker
@berkus
May 16 2018 00:10
@tandrysyawaludin that's not a dependency, that's a "serde_json" feature in diesel, that you need to enable
trsh
@trsh
May 16 2018 09:50
@trsh
Hi sorry. Bu I have again a Rust question
Im trying impl juniper::Context for Pool<ConnectionManager<PgConnection>> {}
The error is impl doesn't use types inside crate· But if I leave only Pool, it requires arguments
So how ?
Denis Lisov
@tanriol
May 16 2018 09:55
@trsh Is the Pool an r2d2::Pool?
You cannot implement a trait defined in an extern crate for a type defined in an extern crate. I'd define a struct ConnectionPool(Pool<ConnectionManager<PgConnection>>); for which you can define the trait.
trsh
@trsh
May 16 2018 10:01
@tanriol clear! tnx
tandrysyawaludin
@tandrysyawaludin
May 16 2018 15:44
use supplier_module::static_rocket_route_info_for_read as read_all_suppliers;

fn main() {
  rocket::ignite()
    .manage(database::db_setting::connect())
    .mount("/suppliers", routes![read_all_suppliers])
    .launch();
}
what is my mistake?
Zakarum
@omni-viral
May 16 2018 16:38
So impl Trait is unusable in traits?