{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/804","repository_url":"https://api.github.com/repos/rust-lang/rust-by-example","labels_url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/804/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/804/comments","events_url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/804/events","html_url":"https://github.com/rust-lang/rust-by-example/pull/804","id":180555520,"number":804,"title":"generics/phantom/testcase_units/units.rs: more info","user":{"login":"francozappa","id":4628017,"avatar_url":"https://avatars.githubusercontent.com/u/4628017?v=3","gravatar_id":"","url":"https://api.github.com/users/francozappa","html_url":"https://github.com/francozappa","followers_url":"https://api.github.com/users/francozappa/followers","following_url":"https://api.github.com/users/francozappa/following{/other_user}","gists_url":"https://api.github.com/users/francozappa/gists{/gist_id}","starred_url":"https://api.github.com/users/francozappa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francozappa/subscriptions","organizations_url":"https://api.github.com/users/francozappa/orgs","repos_url":"https://api.github.com/users/francozappa/repos","events_url":"https://api.github.com/users/francozappa/events{/privacy}","received_events_url":"https://api.github.com/users/francozappa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"assignees":[{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-03T03:07:47Z","updated_at":"2016-10-03T21:42:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust-by-example/pulls/804","html_url":"https://github.com/rust-lang/rust-by-example/pull/804","diff_url":"https://github.com/rust-lang/rust-by-example/pull/804.diff","patch_url":"https://github.com/rust-lang/rust-by-example/pull/804.patch"},"body":"- More info to final `println!` messages:\r\n\t- I think that the whole point of this exercise is to understand\r\n\tthat we can use a generic Phantom parameter to enforce type constraints \r\n\tat compile time, indeed is good to explicitly show the result of the sum with\r\n\tthe two different unit of measure in the printed messages.\r\n\t\r\n- More doc info about `Length` struct:\r\n\t- While I was re writing the example I wanted to add a `Bit` enum\r\n\tand use `Length` over `u32` (something like `let one_byte = // sum 8 one_bit `)\r\n        value but then I realized that `Length` is not generic over the length itself.\t\r\n\t\r\n- I think it would be nice to extend this example using `Length`\r\n\tthat is generic over `T`, is it feasible ?"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/comments/251236050","html_url":"https://github.com/rust-lang/rust-by-example/pull/804#issuecomment-251236050","issue_url":"https://api.github.com/repos/rust-lang/rust-by-example/issues/804","id":251236050,"user":{"login":"mdinger","id":4156987,"avatar_url":"https://avatars.githubusercontent.com/u/4156987?v=3","gravatar_id":"","url":"https://api.github.com/users/mdinger","html_url":"https://github.com/mdinger","followers_url":"https://api.github.com/users/mdinger/followers","following_url":"https://api.github.com/users/mdinger/following{/other_user}","gists_url":"https://api.github.com/users/mdinger/gists{/gist_id}","starred_url":"https://api.github.com/users/mdinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdinger/subscriptions","organizations_url":"https://api.github.com/users/mdinger/orgs","repos_url":"https://api.github.com/users/mdinger/repos","events_url":"https://api.github.com/users/mdinger/events{/privacy}","received_events_url":"https://api.github.com/users/mdinger/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T21:42:35Z","updated_at":"2016-10-03T21:42:35Z","body":"Didn't know what the review button did but I wanted to try even if I can't officially approve it."}}
{"actor":{"display_login":"mdinger"}}