{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/24525111","id":24525111,"diff_hunk":"@@ -0,0 +1,589 @@\n+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n+// file at the top-level directory of this distribution and at\n+// http://rust-lang.org/COPYRIGHT.\n+//\n+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n+// option. This file may not be copied, modified, or distributed\n+// except according to those terms.\n+\n+use prelude::v1::*;\n+\n+use fmt;\n+use hash;\n+use io;\n+use libc::{self, socklen_t, sa_family_t};\n+use mem;\n+use net::{IpAddr, lookup_host, ntoh, hton};\n+use option;\n+use sys_common::{FromInner, AsInner, IntoInner};\n+use vec;\n+\n+/// Representation of a socket address for networking applications\n+///\n+/// A socket address consists of at least an (ip, port) pair and may also\n+/// contain other information depending on the protocol.\n+#[derive(Copy, Clone, PartialEq, Eq, Hash)]\n+pub struct SocketAddr {\n+    repr: Repr,\n+}\n+\n+#[derive(Copy)]\n+enum Repr {\n+    V4(libc::sockaddr_in),\n+    V6(libc::sockaddr_in6),\n+}\n+\n+impl SocketAddr {\n+    /// Creates a new socket address from the (ip, port) pair.\n+    pub fn new(ip: IpAddr, port: u16) -> SocketAddr {\n+        let repr = match ip {\n+            IpAddr::V4(ref ip) => {\n+                Repr::V4(libc::sockaddr_in {\n+                    sin_family: libc::AF_INET as sa_family_t,\n+                    sin_port: hton(port),\n+                    sin_addr: *ip.as_inner(),\n+                    .. unsafe { mem::zeroed() }\n+                })\n+            }\n+            IpAddr::V6(ref ip) => {\n+                Repr::V6(libc::sockaddr_in6 {\n+                    sin6_family: libc::AF_INET6 as sa_family_t,\n+                    sin6_port: hton(port),\n+                    sin6_addr: *ip.as_inner(),\n+                    .. unsafe { mem::zeroed() }\n+                })\n+            }\n+        };\n+        SocketAddr { repr: repr }\n+    }\n+\n+    /// Gets the IP address associated with this socket address.\n+    pub fn ip(&self) -> IpAddr {\n+        match self.repr {\n+            Repr::V4(ref sa) => IpAddr::V4(FromInner::from_inner(sa.sin_addr)),\n+            Repr::V6(ref sa) => IpAddr::V6(FromInner::from_inner(sa.sin6_addr)),\n+        }\n+    }\n+\n+    /// Gets the port number associated with this socket address\n+    pub fn port(&self) -> u16 {\n+        match self.repr {\n+            Repr::V4(ref sa) => ntoh(sa.sin_port),\n+            Repr::V6(ref sa) => ntoh(sa.sin6_port),\n+        }\n+    }\n+\n+    fn set_port(&mut self, port: u16) {\n+        match self.repr {\n+            Repr::V4(ref mut sa) => sa.sin_port = hton(port),\n+            Repr::V6(ref mut sa) => sa.sin6_port = hton(port),\n+        }\n+    }\n+}\n+\n+#[stable(feature = \"rust1\", since = \"1.0.0\")]\n+impl fmt::Display for SocketAddr {\n+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n+        match self.repr {\n+            Repr::V4(_) => write!(f, \"{}:{}\", self.ip(), self.port()),\n+            Repr::V6(_) => write!(f, \"[{}]:{}\", self.ip(), self.port()),\n+        }\n+    }\n+}\n+\n+impl FromInner<libc::sockaddr_in> for SocketAddr {\n+    fn from_inner(addr: libc::sockaddr_in) -> SocketAddr {\n+        SocketAddr { repr: Repr::V4(addr) }\n+    }\n+}\n+impl FromInner<libc::sockaddr_in6> for SocketAddr {\n+    fn from_inner(addr: libc::sockaddr_in6) -> SocketAddr {\n+        SocketAddr { repr: Repr::V6(addr) }\n+    }\n+}\n+\n+impl<'a> IntoInner<(*const libc::sockaddr, socklen_t)> for &'a SocketAddr {\n+    fn into_inner(self) -> (*const libc::sockaddr, socklen_t) {\n+        match self.repr {\n+            Repr::V4(ref a) => {\n+                (a as *const _ as *const _, mem::size_of_val(a) as socklen_t)\n+            }\n+            Repr::V6(ref a) => {\n+                (a as *const _ as *const _, mem::size_of_val(a) as socklen_t)\n+            }\n+        }\n+    }\n+}\n+\n+impl fmt::Debug for SocketAddr {\n+    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {\n+        fmt::Display::fmt(self, fmt)\n+    }\n+}\n+\n+impl Clone for Repr {\n+    fn clone(&self) -> Repr { *self }\n+}\n+\n+impl PartialEq for Repr {\n+    fn eq(&self, other: &Repr) -> bool {\n+        match (*self, *other) {\n+            (Repr::V4(ref a), Repr::V4(ref b)) => {\n+                a.sin_port == b.sin_port &&\n+                    a.sin_addr.s_addr == b.sin_addr.s_addr\n+            }\n+            (Repr::V6(ref a), Repr::V6(ref b)) => {\n+                a.sin6_port == b.sin6_port &&\n+                    a.sin6_addr.s6_addr == b.sin6_addr.s6_addr &&\n+                    a.sin6_flowinfo == b.sin6_flowinfo &&\n+                    a.sin6_scope_id == b.sin6_scope_id\n+            }\n+            _ => false,\n+        }\n+    }\n+}\n+impl Eq for Repr {}\n+\n+impl<S: hash::Hasher + hash::Writer> hash::Hash<S> for Repr {\n+    fn hash(&self, s: &mut S) {\n+        match *self {\n+            Repr::V4(ref a) => {\n+                (a.sin_family, a.sin_port, a.sin_addr.s_addr).hash(s)\n+            }\n+            Repr::V6(ref a) => {\n+                (a.sin6_family, a.sin6_port, &a.sin6_addr.s6_addr,\n+                 a.sin6_flowinfo, a.sin6_scope_id).hash(s)\n+            }\n+        }\n+    }\n+}\n+\n+/// A trait for objects which can be converted or resolved to one or more\n+/// `SocketAddr` values.\n+///\n+/// This trait is used for generic address resolution when constructing network\n+/// objects.  By default it is implemented for the following types:\n+///\n+///  * `SocketAddr` - `to_socket_addrs` is identity function.\n+///\n+///  * `(IpAddr, u16)` - `to_socket_addrs` constructs `SocketAddr` trivially.\n+///\n+///  * `(&str, u16)` - the string should be either a string representation of an\n+///    IP address expected by `FromStr` implementation for `IpAddr` or a host\n+///    name.\n+///\n+///  * `&str` - the string should be either a string representation of a\n+///    `SocketAddr` as expected by its `FromStr` implementation or a string like\n+///    `<host_name>:<port>` pair where `<port>` is a `u16` value.\n+///\n+/// This trait allows constructing network objects like `TcpStream` or\n+/// `UdpSocket` easily with values of various types for the bind/connection\n+/// address. It is needed because sometimes one type is more appropriate than\n+/// the other: for simple uses a string like `\"localhost:12345\"` is much nicer\n+/// than manual construction of the corresponding `SocketAddr`, but sometimes\n+/// `SocketAddr` value is *the* main source of the address, and converting it to\n+/// some other type (e.g. a string) just for it to be converted back to\n+/// `SocketAddr` in constructor methods is pointless.\n+///\n+/// Some examples:\n+///\n+/// ```no_run\n+/// use std::net::{IpAddr, SocketAddr, TcpStream, UdpSocket, TcpListener};\n+///\n+/// fn main() {\n+///     let ip = IpAddr::new_v4(127, 0, 0, 1);\n+///     let port = 12345;\n+///\n+///     // The following lines are equivalent modulo possible \"localhost\" name\n+///     // resolution differences\n+///     let tcp_s = TcpStream::connect(&SocketAddr::new(ip, port));\n+///     let tcp_s = TcpStream::connect(&(ip, port));\n+///     let tcp_s = TcpStream::connect(&(\"127.0.0.1\", port));\n+///     let tcp_s = TcpStream::connect(&(\"localhost\", port));\n+///     let tcp_s = TcpStream::connect(\"127.0.0.1:12345\");\n+///     let tcp_s = TcpStream::connect(\"localhost:12345\");\n+///\n+///     // TcpListener::bind(), UdpSocket::bind() and UdpSocket::send_to()\n+///     // behave similarly\n+///     let tcp_l = TcpListener::bind(\"localhost:12345\");\n+///\n+///     let mut udp_s = UdpSocket::bind(&(\"127.0.0.1\", port)).unwrap();\n+///     udp_s.send_to(&[7], &(ip, 23451));\n+/// }\n+/// ```\n+pub trait ToSocketAddrs {\n+    /// Returned iterator over socket addresses which this type may correspond\n+    /// to.\n+    type Iter: Iterator<Item=SocketAddr>;\n+\n+    /// Converts this object to single socket address value.","path":"src/libstd/net/addr.rs","position":221,"original_position":221,"commit_id":"e03007433f5fafa6548f7fe67360ad0a0d91d2b2","original_commit_id":"e03007433f5fafa6548f7fe67360ad0a0d91d2b2","user":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"body":"This doc comment seems stale.","created_at":"2015-02-11T19:29:13Z","updated_at":"2015-02-11T19:29:13Z","html_url":"https://github.com/rust-lang/rust/pull/22015#discussion_r24525111","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/22015","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/24525111"},"html":{"href":"https://github.com/rust-lang/rust/pull/22015#discussion_r24525111"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22015"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/22015","id":28831061,"html_url":"https://github.com/rust-lang/rust/pull/22015","diff_url":"https://github.com/rust-lang/rust/pull/22015.diff","patch_url":"https://github.com/rust-lang/rust/pull/22015.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22015","number":22015,"state":"open","locked":false,"title":"std: Add a `net` module for TCP/UDP","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"This commit is an implementation of [RFC 807][rfc] which adds a `std::net`\r\nmodule for basic neworking based on top of `std::io`. This module serves as a\r\nreplacement for the `std::old_io::net` module and networking primitives in\r\n`old_io`.\r\n\r\n[rfc]: fillmein\r\n\r\nThe major focus of this redesign is to cut back on the level of abstraction to\r\nthe point that each of the networking types is just a bare socket. To this end\r\nfunctionality such as timeouts and cloning has been removed (although cloning\r\ncan be done through `duplicate`, it may just yield an error).\r\n\r\nWith this `net` module comes a new implementation of `SocketAddr` and `IpAddr`.\r\nThis work is entirely based on #20785 and the only changes were to alter the\r\nin-memory representation to match the `libc`-expected variants and to move from\r\npublic fields to accessors.","created_at":"2015-02-06T18:35:24Z","updated_at":"2015-02-11T19:29:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f4d085185c02cedceabd9603abd5d673d74a9ab","assignee":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/22015/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/22015/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/22015/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/e03007433f5fafa6548f7fe67360ad0a0d91d2b2","head":{"label":"alexcrichton:netv2","ref":"netv2","sha":"e03007433f5fafa6548f7fe67360ad0a0d91d2b2","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"repo":{"id":7385331,"name":"rust","full_name":"alexcrichton/rust","owner":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexcrichton/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/alexcrichton/rust","forks_url":"https://api.github.com/repos/alexcrichton/rust/forks","keys_url":"https://api.github.com/repos/alexcrichton/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/rust/teams","hooks_url":"https://api.github.com/repos/alexcrichton/rust/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/rust/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/rust/events","assignees_url":"https://api.github.com/repos/alexcrichton/rust/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/rust/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/rust/tags","blobs_url":"https://api.github.com/repos/alexcrichton/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/rust/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/rust/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/rust/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/rust/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/rust/subscription","commits_url":"https://api.github.com/repos/alexcrichton/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexcrichton/rust/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/rust/merges","archive_url":"https://api.github.com/repos/alexcrichton/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/rust/downloads","issues_url":"https://api.github.com/repos/alexcrichton/rust/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/rust/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/rust/releases{/id}","created_at":"2012-12-31T08:59:51Z","updated_at":"2014-12-22T16:32:12Z","pushed_at":"2015-02-10T22:12:23Z","git_url":"git://github.com/alexcrichton/rust.git","ssh_url":"git@github.com:alexcrichton/rust.git","clone_url":"https://github.com/alexcrichton/rust.git","svn_url":"https://github.com/alexcrichton/rust","homepage":"http://www.rust-lang.org","size":242284,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"incoming"}},"base":{"label":"rust-lang:master","ref":"master","sha":"0bfe358e0fe3b35f0434e81e7c53ea844e95cc13","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2015-02-11T19:10:06Z","pushed_at":"2015-02-11T17:59:38Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":471496,"stargazers_count":9302,"watchers_count":9302,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1778,"mirror_url":null,"open_issues_count":1969,"forks":1778,"open_issues":1969,"watchers":9302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22015"},"html":{"href":"https://github.com/rust-lang/rust/pull/22015"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/22015"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/22015/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22015/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/22015/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/e03007433f5fafa6548f7fe67360ad0a0d91d2b2"}}}}