{"action":"created","comment":{"url":"https://api.github.com/repos/carllerche/nix-rust/pulls/comments/49105329","id":49105329,"diff_hunk":"@@ -52,28 +53,64 @@ pub fn errno() -> i32 {\n     }\n }\n \n-macro_rules! impl_errno {\n-    ($errno:ty) => {\n-        impl $errno {\n-            pub fn last() -> Errno {\n-                super::last()\n-            }\n+impl Errno {\n+    pub fn last() -> Self {\n+        last()\n+    }\n \n-            pub fn desc(self) -> &'static str {\n-                super::desc(self)\n-            }\n+    pub fn desc(self) -> &'static str {\n+        desc(self)\n+    }\n \n-            pub fn from_i32(err: i32) -> Errno {\n-                from_i32(err)\n-            }\n+    pub fn from_i32(err: i32) -> Errno {\n+        from_i32(err)\n+    }\n \n-            pub unsafe fn clear() -> () {\n-                super::clear()\n-            }\n+    pub unsafe fn clear() -> () {\n+        clear()\n+    }\n+\n+    pub fn result<S: ErrnoSentinel + PartialEq<S>>(value: S) -> Result<S> {","path":"src/errno.rs","position":42,"original_position":42,"commit_id":"780ae21543a957521ad34a7ce262545d6cfcf019","original_commit_id":"780ae21543a957521ad34a7ce262545d6cfcf019","user":{"login":"kamalmarhubi","id":50936,"avatar_url":"https://avatars.githubusercontent.com/u/50936?v=3","gravatar_id":"","url":"https://api.github.com/users/kamalmarhubi","html_url":"https://github.com/kamalmarhubi","followers_url":"https://api.github.com/users/kamalmarhubi/followers","following_url":"https://api.github.com/users/kamalmarhubi/following{/other_user}","gists_url":"https://api.github.com/users/kamalmarhubi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamalmarhubi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamalmarhubi/subscriptions","organizations_url":"https://api.github.com/users/kamalmarhubi/orgs","repos_url":"https://api.github.com/users/kamalmarhubi/repos","events_url":"https://api.github.com/users/kamalmarhubi/events{/privacy}","received_events_url":"https://api.github.com/users/kamalmarhubi/received_events","type":"User","site_admin":false},"body":"worth documenting that when implementing new functions this should only be used if the sentinel is actually -1","created_at":"2016-01-07T18:16:26Z","updated_at":"2016-01-07T18:16:26Z","html_url":"https://github.com/carllerche/nix-rust/pull/230#discussion_r49105329","pull_request_url":"https://api.github.com/repos/carllerche/nix-rust/pulls/230","_links":{"self":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/comments/49105329"},"html":{"href":"https://github.com/carllerche/nix-rust/pull/230#discussion_r49105329"},"pull_request":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/230"}}},"pull_request":{"url":"https://api.github.com/repos/carllerche/nix-rust/pulls/230","id":55130981,"html_url":"https://github.com/carllerche/nix-rust/pull/230","diff_url":"https://github.com/carllerche/nix-rust/pull/230.diff","patch_url":"https://github.com/carllerche/nix-rust/pull/230.patch","issue_url":"https://api.github.com/repos/carllerche/nix-rust/issues/230","number":230,"state":"open","locked":false,"title":"NixPath -> NixString and Error -> Errno","user":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"body":"Major API change, it passes on the responsibility of dealing with `CString` conversions to the caller. The error type is now just `Errno` itself.\r\n\r\nCloses #221 \r\n\r\ncc @kamalmarhubi","created_at":"2016-01-05T19:21:19Z","updated_at":"2016-01-07T18:16:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa6ecefdfc8d6e47ac5ddf804e22808a85a03e1d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/carllerche/nix-rust/pulls/230/commits","review_comments_url":"https://api.github.com/repos/carllerche/nix-rust/pulls/230/comments","review_comment_url":"https://api.github.com/repos/carllerche/nix-rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/carllerche/nix-rust/issues/230/comments","statuses_url":"https://api.github.com/repos/carllerche/nix-rust/statuses/780ae21543a957521ad34a7ce262545d6cfcf019","head":{"label":"arcnmx:nixstring-errno","ref":"nixstring-errno","sha":"780ae21543a957521ad34a7ce262545d6cfcf019","user":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"repo":{"id":48637077,"name":"nix-rust","full_name":"arcnmx/nix-rust","owner":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arcnmx/nix-rust","description":"Rust friendly bindings to *nix APIs","fork":true,"url":"https://api.github.com/repos/arcnmx/nix-rust","forks_url":"https://api.github.com/repos/arcnmx/nix-rust/forks","keys_url":"https://api.github.com/repos/arcnmx/nix-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arcnmx/nix-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arcnmx/nix-rust/teams","hooks_url":"https://api.github.com/repos/arcnmx/nix-rust/hooks","issue_events_url":"https://api.github.com/repos/arcnmx/nix-rust/issues/events{/number}","events_url":"https://api.github.com/repos/arcnmx/nix-rust/events","assignees_url":"https://api.github.com/repos/arcnmx/nix-rust/assignees{/user}","branches_url":"https://api.github.com/repos/arcnmx/nix-rust/branches{/branch}","tags_url":"https://api.github.com/repos/arcnmx/nix-rust/tags","blobs_url":"https://api.github.com/repos/arcnmx/nix-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arcnmx/nix-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arcnmx/nix-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/arcnmx/nix-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arcnmx/nix-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/arcnmx/nix-rust/languages","stargazers_url":"https://api.github.com/repos/arcnmx/nix-rust/stargazers","contributors_url":"https://api.github.com/repos/arcnmx/nix-rust/contributors","subscribers_url":"https://api.github.com/repos/arcnmx/nix-rust/subscribers","subscription_url":"https://api.github.com/repos/arcnmx/nix-rust/subscription","commits_url":"https://api.github.com/repos/arcnmx/nix-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/arcnmx/nix-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/arcnmx/nix-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/arcnmx/nix-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/arcnmx/nix-rust/contents/{+path}","compare_url":"https://api.github.com/repos/arcnmx/nix-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arcnmx/nix-rust/merges","archive_url":"https://api.github.com/repos/arcnmx/nix-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arcnmx/nix-rust/downloads","issues_url":"https://api.github.com/repos/arcnmx/nix-rust/issues{/number}","pulls_url":"https://api.github.com/repos/arcnmx/nix-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/arcnmx/nix-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/arcnmx/nix-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arcnmx/nix-rust/labels{/name}","releases_url":"https://api.github.com/repos/arcnmx/nix-rust/releases{/id}","created_at":"2015-12-27T07:46:26Z","updated_at":"2015-12-27T07:46:27Z","pushed_at":"2016-01-06T23:12:23Z","git_url":"git://github.com/arcnmx/nix-rust.git","ssh_url":"git@github.com:arcnmx/nix-rust.git","clone_url":"https://github.com/arcnmx/nix-rust.git","svn_url":"https://github.com/arcnmx/nix-rust","homepage":"","size":637,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"carllerche:master","ref":"master","sha":"3154b7da011bba35a2615d00160676bdb7c41cb5","user":{"login":"carllerche","id":6180,"avatar_url":"https://avatars.githubusercontent.com/u/6180?v=3","gravatar_id":"","url":"https://api.github.com/users/carllerche","html_url":"https://github.com/carllerche","followers_url":"https://api.github.com/users/carllerche/followers","following_url":"https://api.github.com/users/carllerche/following{/other_user}","gists_url":"https://api.github.com/users/carllerche/gists{/gist_id}","starred_url":"https://api.github.com/users/carllerche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carllerche/subscriptions","organizations_url":"https://api.github.com/users/carllerche/orgs","repos_url":"https://api.github.com/users/carllerche/repos","events_url":"https://api.github.com/users/carllerche/events{/privacy}","received_events_url":"https://api.github.com/users/carllerche/received_events","type":"User","site_admin":false},"repo":{"id":22734848,"name":"nix-rust","full_name":"carllerche/nix-rust","owner":{"login":"carllerche","id":6180,"avatar_url":"https://avatars.githubusercontent.com/u/6180?v=3","gravatar_id":"","url":"https://api.github.com/users/carllerche","html_url":"https://github.com/carllerche","followers_url":"https://api.github.com/users/carllerche/followers","following_url":"https://api.github.com/users/carllerche/following{/other_user}","gists_url":"https://api.github.com/users/carllerche/gists{/gist_id}","starred_url":"https://api.github.com/users/carllerche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carllerche/subscriptions","organizations_url":"https://api.github.com/users/carllerche/orgs","repos_url":"https://api.github.com/users/carllerche/repos","events_url":"https://api.github.com/users/carllerche/events{/privacy}","received_events_url":"https://api.github.com/users/carllerche/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carllerche/nix-rust","description":"Rust friendly bindings to *nix APIs","fork":false,"url":"https://api.github.com/repos/carllerche/nix-rust","forks_url":"https://api.github.com/repos/carllerche/nix-rust/forks","keys_url":"https://api.github.com/repos/carllerche/nix-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carllerche/nix-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carllerche/nix-rust/teams","hooks_url":"https://api.github.com/repos/carllerche/nix-rust/hooks","issue_events_url":"https://api.github.com/repos/carllerche/nix-rust/issues/events{/number}","events_url":"https://api.github.com/repos/carllerche/nix-rust/events","assignees_url":"https://api.github.com/repos/carllerche/nix-rust/assignees{/user}","branches_url":"https://api.github.com/repos/carllerche/nix-rust/branches{/branch}","tags_url":"https://api.github.com/repos/carllerche/nix-rust/tags","blobs_url":"https://api.github.com/repos/carllerche/nix-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carllerche/nix-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carllerche/nix-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/carllerche/nix-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carllerche/nix-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/carllerche/nix-rust/languages","stargazers_url":"https://api.github.com/repos/carllerche/nix-rust/stargazers","contributors_url":"https://api.github.com/repos/carllerche/nix-rust/contributors","subscribers_url":"https://api.github.com/repos/carllerche/nix-rust/subscribers","subscription_url":"https://api.github.com/repos/carllerche/nix-rust/subscription","commits_url":"https://api.github.com/repos/carllerche/nix-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/carllerche/nix-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/carllerche/nix-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/carllerche/nix-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/carllerche/nix-rust/contents/{+path}","compare_url":"https://api.github.com/repos/carllerche/nix-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carllerche/nix-rust/merges","archive_url":"https://api.github.com/repos/carllerche/nix-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carllerche/nix-rust/downloads","issues_url":"https://api.github.com/repos/carllerche/nix-rust/issues{/number}","pulls_url":"https://api.github.com/repos/carllerche/nix-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/carllerche/nix-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/carllerche/nix-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carllerche/nix-rust/labels{/name}","releases_url":"https://api.github.com/repos/carllerche/nix-rust/releases{/id}","created_at":"2014-08-07T20:03:36Z","updated_at":"2016-01-02T03:13:50Z","pushed_at":"2016-01-07T15:32:19Z","git_url":"git://github.com/carllerche/nix-rust.git","ssh_url":"git@github.com:carllerche/nix-rust.git","clone_url":"https://github.com/carllerche/nix-rust.git","svn_url":"https://github.com/carllerche/nix-rust","homepage":"","size":753,"stargazers_count":143,"watchers_count":143,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":29,"forks":77,"open_issues":29,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/230"},"html":{"href":"https://github.com/carllerche/nix-rust/pull/230"},"issue":{"href":"https://api.github.com/repos/carllerche/nix-rust/issues/230"},"comments":{"href":"https://api.github.com/repos/carllerche/nix-rust/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/carllerche/nix-rust/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/carllerche/nix-rust/statuses/780ae21543a957521ad34a7ce262545d6cfcf019"}}}}