{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/52963","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/52963/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/52963/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/52963/events","html_url":"https://github.com/rust-lang/rust/issues/52963","id":346796203,"node_id":"MDU6SXNzdWUzNDY3OTYyMDM=","number":52963,"title":"Tracking issue for integer types conversion to and from byte arrays","user":{"login":"SimonSapin","id":291359,"node_id":"MDQ6VXNlcjI5MTM1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291359?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"labels":[{"id":246778137,"node_id":"MDU6TGFiZWwyNDY3NzgxMzc=","url":"https://api.github.com/repos/rust-lang/rust/labels/B-unstable","name":"B-unstable","color":"d304cb","default":false},{"id":650846969,"node_id":"MDU6TGFiZWw2NTA4NDY5Njk=","url":"https://api.github.com/repos/rust-lang/rust/labels/C-tracking-issue","name":"C-tracking-issue","color":"f5f1fd","default":false},{"id":211668062,"node_id":"MDU6TGFiZWwyMTE2NjgwNjI=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false},{"id":919710011,"node_id":"MDU6TGFiZWw5MTk3MTAwMTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/disposition-merge","name":"disposition-merge","color":"008800","default":false},{"id":638321554,"node_id":"MDU6TGFiZWw2MzgzMjE1NTQ=","url":"https://api.github.com/repos/rust-lang/rust/labels/proposed-final-comment-period","name":"proposed-final-comment-period","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-01T22:42:03Z","updated_at":"2018-08-14T16:50:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"A previous incarnation of this API that went though FCP in https://github.com/rust-lang/rust/issues/49792, but stabilization was reverted while still in Nightly in favor of this API.\r\n\r\nImplemented in https://github.com/rust-lang/rust/pull/51919, conversions between all integer types and appropriately-sized arrays of `u8`, using the specified endianness:\r\n\r\n```rust\r\nimpl $Int {\r\n    pub fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {…}\r\n    pub fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {…}\r\n    pub fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {…}\r\n    pub fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {…}\r\n    pub fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {…}\r\n    pub fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {…}\r\n}\r\n```\r\n\r\n`ne`, `le`, and `be` mean native-endian, little-endian, and big-endian respectively. Native-endian means the target platform’s endianness. Those conversions are implemented as literally `transmute` and nothing else (but safe). The other conversions use swap or do not swap the byte order depending on the target’s endianness."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/412940111","html_url":"https://github.com/rust-lang/rust/issues/52963#issuecomment-412940111","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/52963","id":412940111,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjk0MDExMQ==","user":{"login":"SimonSapin","id":291359,"node_id":"MDQ6VXNlcjI5MTM1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291359?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T16:50:11Z","updated_at":"2018-08-14T16:50:11Z","author_association":"CONTRIBUTOR","body":"@Kimundi I belive https://github.com/rust-lang/rust/pull/53358 fixes your concern. (Could you review it?)"}}
{"actor":{"display_login":"SimonSapin"}}