{"action":"created","comment":{"url":"https://api.github.com/repos/bluss/arrayvec/pulls/comments/37711110","id":37711110,"diff_hunk":"@@ -38,6 +38,14 @@ impl<T> NoDrop<T> {\n         NoDrop(Flag::Alive(value))\n     }\n \n+    /// Create a new **NoDrop** without a value.\n+    ///\n+    /// It is not safe to use the returned value without first checking `is_alive()`.\n+    #[inline]\n+    pub unsafe fn dropped() -> NoDrop<T> {","path":"nodrop/src/lib.rs","position":26,"original_position":26,"commit_id":"3d4a270a618cc8c3b9935b71b4c873ce3757ee69","original_commit_id":"3d4a270a618cc8c3b9935b71b4c873ce3757ee69","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":"That one, I don't actually have a concrete use case for. It just seemed a\nbit more appropriate than `new(mem::uninitialized())` for lazy\ninstantiation. The main purpose of this pr is to allow the discriminant to\ndouble as an observable drop flag. The rest is auxiliary, though I do like\ntake().\n\nOn Sunday, August 23, 2015, bluss <notifications@github.com> wrote:\n\n> In nodrop/src/lib.rs\n> <https://github.com/bluss/arrayvec/pull/8#discussion_r37710970>:\n>\n> > @@ -38,6 +38,14 @@ impl<T> NoDrop<T> {\n> >          NoDrop(Flag::Alive(value))\n> >      }\n> >\n> > +    /// Create a new **NoDrop** without a value.\n> > +    ///\n> > +    /// It is not safe to use the returned value without first checking `is_alive()`.\n> > +    #[inline]\n> > +    pub unsafe fn dropped() -> NoDrop<T> {\n>\n> Interesting. Does this method have any use?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/bluss/arrayvec/pull/8/files#r37710970>.\n>\n","created_at":"2015-08-23T22:08:49Z","updated_at":"2015-08-23T22:08:49Z","html_url":"https://github.com/bluss/arrayvec/pull/8#discussion_r37711110","pull_request_url":"https://api.github.com/repos/bluss/arrayvec/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/comments/37711110"},"html":{"href":"https://github.com/bluss/arrayvec/pull/8#discussion_r37711110"},"pull_request":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/bluss/arrayvec/pulls/8","id":43127602,"html_url":"https://github.com/bluss/arrayvec/pull/8","diff_url":"https://github.com/bluss/arrayvec/pull/8.diff","patch_url":"https://github.com/bluss/arrayvec/pull/8.patch","issue_url":"https://api.github.com/repos/bluss/arrayvec/issues/8","number":8,"state":"open","locked":false,"title":"Expose nodrop state through its API","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":"When using `NoDrop` with `no_drop_flag`, there is no way to assert whether the inner value has been dropped or not. This PR exposes `is_alive` for containing structures that may also use `unsafe_no_drop_flag` themselves.","created_at":"2015-08-23T20:12:30Z","updated_at":"2015-08-23T22:08:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4aa940ac8e3eab82909922d8df57ea25a2930cb3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bluss/arrayvec/pulls/8/commits","review_comments_url":"https://api.github.com/repos/bluss/arrayvec/pulls/8/comments","review_comment_url":"https://api.github.com/repos/bluss/arrayvec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bluss/arrayvec/issues/8/comments","statuses_url":"https://api.github.com/repos/bluss/arrayvec/statuses/3d4a270a618cc8c3b9935b71b4c873ce3757ee69","head":{"label":"arcnmx:nodrop","ref":"nodrop","sha":"3d4a270a618cc8c3b9935b71b4c873ce3757ee69","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":41265004,"name":"arrayvec","full_name":"arcnmx/arrayvec","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/arrayvec","description":"A vector with a fixed capacity. (Rust)","fork":true,"url":"https://api.github.com/repos/arcnmx/arrayvec","forks_url":"https://api.github.com/repos/arcnmx/arrayvec/forks","keys_url":"https://api.github.com/repos/arcnmx/arrayvec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arcnmx/arrayvec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arcnmx/arrayvec/teams","hooks_url":"https://api.github.com/repos/arcnmx/arrayvec/hooks","issue_events_url":"https://api.github.com/repos/arcnmx/arrayvec/issues/events{/number}","events_url":"https://api.github.com/repos/arcnmx/arrayvec/events","assignees_url":"https://api.github.com/repos/arcnmx/arrayvec/assignees{/user}","branches_url":"https://api.github.com/repos/arcnmx/arrayvec/branches{/branch}","tags_url":"https://api.github.com/repos/arcnmx/arrayvec/tags","blobs_url":"https://api.github.com/repos/arcnmx/arrayvec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arcnmx/arrayvec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arcnmx/arrayvec/git/refs{/sha}","trees_url":"https://api.github.com/repos/arcnmx/arrayvec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arcnmx/arrayvec/statuses/{sha}","languages_url":"https://api.github.com/repos/arcnmx/arrayvec/languages","stargazers_url":"https://api.github.com/repos/arcnmx/arrayvec/stargazers","contributors_url":"https://api.github.com/repos/arcnmx/arrayvec/contributors","subscribers_url":"https://api.github.com/repos/arcnmx/arrayvec/subscribers","subscription_url":"https://api.github.com/repos/arcnmx/arrayvec/subscription","commits_url":"https://api.github.com/repos/arcnmx/arrayvec/commits{/sha}","git_commits_url":"https://api.github.com/repos/arcnmx/arrayvec/git/commits{/sha}","comments_url":"https://api.github.com/repos/arcnmx/arrayvec/comments{/number}","issue_comment_url":"https://api.github.com/repos/arcnmx/arrayvec/issues/comments{/number}","contents_url":"https://api.github.com/repos/arcnmx/arrayvec/contents/{+path}","compare_url":"https://api.github.com/repos/arcnmx/arrayvec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arcnmx/arrayvec/merges","archive_url":"https://api.github.com/repos/arcnmx/arrayvec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arcnmx/arrayvec/downloads","issues_url":"https://api.github.com/repos/arcnmx/arrayvec/issues{/number}","pulls_url":"https://api.github.com/repos/arcnmx/arrayvec/pulls{/number}","milestones_url":"https://api.github.com/repos/arcnmx/arrayvec/milestones{/number}","notifications_url":"https://api.github.com/repos/arcnmx/arrayvec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arcnmx/arrayvec/labels{/name}","releases_url":"https://api.github.com/repos/arcnmx/arrayvec/releases{/id}","created_at":"2015-08-23T20:02:09Z","updated_at":"2015-08-23T20:02:09Z","pushed_at":"2015-08-23T21:29:27Z","git_url":"git://github.com/arcnmx/arrayvec.git","ssh_url":"git@github.com:arcnmx/arrayvec.git","clone_url":"https://github.com/arcnmx/arrayvec.git","svn_url":"https://github.com/arcnmx/arrayvec","homepage":"http://bluss.github.io/arrayvec","size":1112,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bluss:master","ref":"master","sha":"9afff02a69e45c21ae6cb36bd9e4f7c2c543109d","user":{"login":"bluss","id":3209739,"avatar_url":"https://avatars.githubusercontent.com/u/3209739?v=3","gravatar_id":"","url":"https://api.github.com/users/bluss","html_url":"https://github.com/bluss","followers_url":"https://api.github.com/users/bluss/followers","following_url":"https://api.github.com/users/bluss/following{/other_user}","gists_url":"https://api.github.com/users/bluss/gists{/gist_id}","starred_url":"https://api.github.com/users/bluss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluss/subscriptions","organizations_url":"https://api.github.com/users/bluss/orgs","repos_url":"https://api.github.com/users/bluss/repos","events_url":"https://api.github.com/users/bluss/events{/privacy}","received_events_url":"https://api.github.com/users/bluss/received_events","type":"User","site_admin":false},"repo":{"id":35889751,"name":"arrayvec","full_name":"bluss/arrayvec","owner":{"login":"bluss","id":3209739,"avatar_url":"https://avatars.githubusercontent.com/u/3209739?v=3","gravatar_id":"","url":"https://api.github.com/users/bluss","html_url":"https://github.com/bluss","followers_url":"https://api.github.com/users/bluss/followers","following_url":"https://api.github.com/users/bluss/following{/other_user}","gists_url":"https://api.github.com/users/bluss/gists{/gist_id}","starred_url":"https://api.github.com/users/bluss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluss/subscriptions","organizations_url":"https://api.github.com/users/bluss/orgs","repos_url":"https://api.github.com/users/bluss/repos","events_url":"https://api.github.com/users/bluss/events{/privacy}","received_events_url":"https://api.github.com/users/bluss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bluss/arrayvec","description":"A vector with a fixed capacity. (Rust)","fork":false,"url":"https://api.github.com/repos/bluss/arrayvec","forks_url":"https://api.github.com/repos/bluss/arrayvec/forks","keys_url":"https://api.github.com/repos/bluss/arrayvec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bluss/arrayvec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bluss/arrayvec/teams","hooks_url":"https://api.github.com/repos/bluss/arrayvec/hooks","issue_events_url":"https://api.github.com/repos/bluss/arrayvec/issues/events{/number}","events_url":"https://api.github.com/repos/bluss/arrayvec/events","assignees_url":"https://api.github.com/repos/bluss/arrayvec/assignees{/user}","branches_url":"https://api.github.com/repos/bluss/arrayvec/branches{/branch}","tags_url":"https://api.github.com/repos/bluss/arrayvec/tags","blobs_url":"https://api.github.com/repos/bluss/arrayvec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bluss/arrayvec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bluss/arrayvec/git/refs{/sha}","trees_url":"https://api.github.com/repos/bluss/arrayvec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bluss/arrayvec/statuses/{sha}","languages_url":"https://api.github.com/repos/bluss/arrayvec/languages","stargazers_url":"https://api.github.com/repos/bluss/arrayvec/stargazers","contributors_url":"https://api.github.com/repos/bluss/arrayvec/contributors","subscribers_url":"https://api.github.com/repos/bluss/arrayvec/subscribers","subscription_url":"https://api.github.com/repos/bluss/arrayvec/subscription","commits_url":"https://api.github.com/repos/bluss/arrayvec/commits{/sha}","git_commits_url":"https://api.github.com/repos/bluss/arrayvec/git/commits{/sha}","comments_url":"https://api.github.com/repos/bluss/arrayvec/comments{/number}","issue_comment_url":"https://api.github.com/repos/bluss/arrayvec/issues/comments{/number}","contents_url":"https://api.github.com/repos/bluss/arrayvec/contents/{+path}","compare_url":"https://api.github.com/repos/bluss/arrayvec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bluss/arrayvec/merges","archive_url":"https://api.github.com/repos/bluss/arrayvec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bluss/arrayvec/downloads","issues_url":"https://api.github.com/repos/bluss/arrayvec/issues{/number}","pulls_url":"https://api.github.com/repos/bluss/arrayvec/pulls{/number}","milestones_url":"https://api.github.com/repos/bluss/arrayvec/milestones{/number}","notifications_url":"https://api.github.com/repos/bluss/arrayvec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bluss/arrayvec/labels{/name}","releases_url":"https://api.github.com/repos/bluss/arrayvec/releases{/id}","created_at":"2015-05-19T15:08:23Z","updated_at":"2015-08-12T18:37:16Z","pushed_at":"2015-08-23T21:29:27Z","git_url":"git://github.com/bluss/arrayvec.git","ssh_url":"git@github.com:bluss/arrayvec.git","clone_url":"https://github.com/bluss/arrayvec.git","svn_url":"https://github.com/bluss/arrayvec","homepage":"http://bluss.github.io/arrayvec","size":1112,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/8"},"html":{"href":"https://github.com/bluss/arrayvec/pull/8"},"issue":{"href":"https://api.github.com/repos/bluss/arrayvec/issues/8"},"comments":{"href":"https://api.github.com/repos/bluss/arrayvec/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bluss/arrayvec/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/bluss/arrayvec/statuses/3d4a270a618cc8c3b9935b71b4c873ce3757ee69"}}}}