{"action":"created","issue":{"url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/3","repository_url":"https://api.github.com/repos/outersky/r2d2-mysql","labels_url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/3/comments","events_url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/3/events","html_url":"https://github.com/outersky/r2d2-mysql/issues/3","id":161608223,"number":3,"title":"Compiler gives error on r2d2::Pool<r2d2_mysql::MysqlConnectionManager>","user":{"login":"shahmuratov","id":8235041,"avatar_url":"https://avatars.githubusercontent.com/u/8235041?v=3","gravatar_id":"","url":"https://api.github.com/users/shahmuratov","html_url":"https://github.com/shahmuratov","followers_url":"https://api.github.com/users/shahmuratov/followers","following_url":"https://api.github.com/users/shahmuratov/following{/other_user}","gists_url":"https://api.github.com/users/shahmuratov/gists{/gist_id}","starred_url":"https://api.github.com/users/shahmuratov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahmuratov/subscriptions","organizations_url":"https://api.github.com/users/shahmuratov/orgs","repos_url":"https://api.github.com/users/shahmuratov/repos","events_url":"https://api.github.com/users/shahmuratov/events{/privacy}","received_events_url":"https://api.github.com/users/shahmuratov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-22T07:05:11Z","updated_at":"2016-06-22T12:28:00Z","closed_at":null,"body":"Hi!\r\nI'm trying to compile code:\r\n```\r\nstruct Foo {\r\n    pool: r2d2::Pool<r2d2_mysql::MysqlConnectionManager>,\r\n} \r\n```\r\nwhich gives me error\r\n```\r\nsrc/main.rs:65:5: 65:39 error: the trait bound `r2d2_mysql::MysqlConnectionManager: r2d2::ManageConnection` is not satisfied [E0277]\r\nsrc/main.rs:65     pool: Pool<MysqlConnectionManager>,\r\n                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nsrc/main.rs:65:5: 65:39 help: run `rustc --explain E0277` to see a detailed explanation\r\nsrc/main.rs:65:5: 65:39 note: required by `r2d2::Pool`\r\n```\r\nMy Cargo.toml\r\n```\r\n[dependencies]\r\nmysql = \"*\"\r\nr2d2 = \"*\"\r\nr2d2_mysql = \"*\"\r\nrustc-serialize = \"*\"\r\n```\r\nIf I try to use https://github.com/sfackler/r2d2-postgres and replace code with\r\n```\r\nstruct Foo {\r\n    pool: r2d2::Pool<r2d2_postgres::PostgresConnectionManager>,\r\n} \r\n```\r\neverything compiles.\r\nI can't see real differences in this two cargos. Both have \r\n```\r\nimpl r2d2::ManageConnection for PostgresConnectionManager {\r\n```\r\n\r\n```\r\nimpl r2d2::ManageConnection for MysqlConnectionManager {\r\n```\r\nI would appreciate any help. Thanks"},"comment":{"url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/comments/227727651","html_url":"https://github.com/outersky/r2d2-mysql/issues/3#issuecomment-227727651","issue_url":"https://api.github.com/repos/outersky/r2d2-mysql/issues/3","id":227727651,"user":{"login":"shahmuratov","id":8235041,"avatar_url":"https://avatars.githubusercontent.com/u/8235041?v=3","gravatar_id":"","url":"https://api.github.com/users/shahmuratov","html_url":"https://github.com/shahmuratov","followers_url":"https://api.github.com/users/shahmuratov/followers","following_url":"https://api.github.com/users/shahmuratov/following{/other_user}","gists_url":"https://api.github.com/users/shahmuratov/gists{/gist_id}","starred_url":"https://api.github.com/users/shahmuratov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahmuratov/subscriptions","organizations_url":"https://api.github.com/users/shahmuratov/orgs","repos_url":"https://api.github.com/users/shahmuratov/repos","events_url":"https://api.github.com/users/shahmuratov/events{/privacy}","received_events_url":"https://api.github.com/users/shahmuratov/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T12:27:59Z","updated_at":"2016-06-22T12:27:59Z","body":"Next problem which I faced is\r\n```\r\nlet config = r2d2::Config::builder()\r\n        .pool_size(100)\r\n        .build();\r\n    let manager = r2d2_mysql::MysqlConnectionManager::new(\"localhost:1234\");\r\n\r\n    let pool = Arc::new(r2d2::Pool::new(config, manager).unwrap());\r\n```\r\ndoesn't compile.\r\n```\r\nsrc/main.rs:110:25: 110:40 error: the trait bound `std::result::Result<r2d2_mysql::MysqlConnectionManager, r2d2_mysql::Error>: r2d2::ManageConnection` is not satisfied [E0277]\r\nsrc/main.rs:110     let pool = Arc::new(r2d2::Pool::new(config, manager).unwrap());\r\n                                        ^~~~~~~~~~~~~~~\r\nsrc/main.rs:110:25: 110:40 help: run `rustc --explain E0277` to see a detailed explanation\r\nsrc/main.rs:110:25: 110:40 note: required by `r2d2::Pool::new`\r\n```"}}
{"actor":{"display_login":"shahmuratov"}}