{"action":"created","issue":{"url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/15","labels_url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/15/comments","events_url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/15/events","html_url":"https://github.com/xaviershay/rust-puzzlefighter/issues/15","id":109652360,"number":15,"title":"cfg(debug_assertions) unnecessary","user":{"login":"xrl","id":693059,"avatar_url":"https://avatars.githubusercontent.com/u/693059?v=3","gravatar_id":"","url":"https://api.github.com/users/xrl","html_url":"https://github.com/xrl","followers_url":"https://api.github.com/users/xrl/followers","following_url":"https://api.github.com/users/xrl/following{/other_user}","gists_url":"https://api.github.com/users/xrl/gists{/gist_id}","starred_url":"https://api.github.com/users/xrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrl/subscriptions","organizations_url":"https://api.github.com/users/xrl/orgs","repos_url":"https://api.github.com/users/xrl/repos","events_url":"https://api.github.com/users/xrl/events{/privacy}","received_events_url":"https://api.github.com/users/xrl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-03T23:57:07Z","updated_at":"2015-10-04T01:15:50Z","closed_at":"2015-10-04T01:15:10Z","body":"I cloned the repo and was unable to run the project using `cargo run --release` because `Piece::new` was no longer being compiled.\r\n\r\n```\r\nimpl Piece {\r\n    #[cfg(debug_assertions)]\r\n    pub fn new(b1: Block, b2: Block) -> Self {\r\n        Piece {\r\n            blocks: [b1, b2],\r\n            position: GridPosition::new(0, 0),\r\n            direction: Direction::Up,\r\n            floor_kicks: 0,\r\n        }\r\n    }\r\n```\r\n\r\nUntil now I was unaware of `debug_assertions` config flag until now but I don't think you want to hide the `Piece::new` ever. In any case, removing the `#[cfg(debug_assertions)]` got me unblocked and I was able to run the game in a release build. Neat game!"},"comment":{"url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/comments/145304250","html_url":"https://github.com/xaviershay/rust-puzzlefighter/issues/15#issuecomment-145304250","issue_url":"https://api.github.com/repos/xaviershay/rust-puzzlefighter/issues/15","id":145304250,"user":{"login":"xaviershay","id":1714,"avatar_url":"https://avatars.githubusercontent.com/u/1714?v=3","gravatar_id":"","url":"https://api.github.com/users/xaviershay","html_url":"https://github.com/xaviershay","followers_url":"https://api.github.com/users/xaviershay/followers","following_url":"https://api.github.com/users/xaviershay/following{/other_user}","gists_url":"https://api.github.com/users/xaviershay/gists{/gist_id}","starred_url":"https://api.github.com/users/xaviershay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaviershay/subscriptions","organizations_url":"https://api.github.com/users/xaviershay/orgs","repos_url":"https://api.github.com/users/xaviershay/repos","events_url":"https://api.github.com/users/xaviershay/events{/privacy}","received_events_url":"https://api.github.com/users/xaviershay/received_events","type":"User","site_admin":false},"created_at":"2015-10-04T01:15:50Z","updated_at":"2015-10-04T01:15:50Z","body":"Thanks for trying! I need to get an AI going so you can play 1P :)\r\n\r\nThis was in here from way back wrestling with dead code warnings and I didn't quite understand what was happening. Thanks for reporting."}}