{"action":"opened","number":65,"pull_request":{"url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65","id":39214698,"html_url":"https://github.com/alexcrichton/toml-rs/pull/65","diff_url":"https://github.com/alexcrichton/toml-rs/pull/65.diff","patch_url":"https://github.com/alexcrichton/toml-rs/pull/65.patch","issue_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/65","number":65,"state":"open","locked":false,"title":"Do not clear arrays if there are leftovers","user":{"login":"IvanUkhov","id":57440,"avatar_url":"https://avatars.githubusercontent.com/u/57440?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanUkhov","html_url":"https://github.com/IvanUkhov","followers_url":"https://api.github.com/users/IvanUkhov/followers","following_url":"https://api.github.com/users/IvanUkhov/following{/other_user}","gists_url":"https://api.github.com/users/IvanUkhov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanUkhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanUkhov/subscriptions","organizations_url":"https://api.github.com/users/IvanUkhov/orgs","repos_url":"https://api.github.com/users/IvanUkhov/repos","events_url":"https://api.github.com/users/IvanUkhov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanUkhov/received_events","type":"User","site_admin":false},"body":"Hello,\r\n\r\n\r\nI’m curious if anybody had a use case similar to the following. I’m trying to decode a deeply nested struct, and I’d like to allow each node to have arbitrary attributes by capturing leftovers in a special field. I’m doing so by post-processing the `toml` field of `Decoder` and assigning leftovers to the corresponding structs. The problem is `Array`: if an element of an array has been entirely parsed, it gets replaced by `Value::Integer(0)` and eventually removed from the array. As a result, one cannot tell in general the original positions—that is, the positions in the TOML file—of the elements in a leftover array. I would be grateful for any feedback. Thank you.\r\n\r\n\r\nRegards,\r\nIvan","created_at":"2015-07-05T00:49:58Z","updated_at":"2015-07-05T00:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65/commits","review_comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65/comments","review_comment_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/65/comments","statuses_url":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/b4f1e4371929db3ba4d6a0fdad464177e28bf981","head":{"label":"IvanUkhov:array-leftovers","ref":"array-leftovers","sha":"b4f1e4371929db3ba4d6a0fdad464177e28bf981","user":{"login":"IvanUkhov","id":57440,"avatar_url":"https://avatars.githubusercontent.com/u/57440?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanUkhov","html_url":"https://github.com/IvanUkhov","followers_url":"https://api.github.com/users/IvanUkhov/followers","following_url":"https://api.github.com/users/IvanUkhov/following{/other_user}","gists_url":"https://api.github.com/users/IvanUkhov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanUkhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanUkhov/subscriptions","organizations_url":"https://api.github.com/users/IvanUkhov/orgs","repos_url":"https://api.github.com/users/IvanUkhov/repos","events_url":"https://api.github.com/users/IvanUkhov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanUkhov/received_events","type":"User","site_admin":false},"repo":{"id":38551609,"name":"toml-rs","full_name":"IvanUkhov/toml-rs","owner":{"login":"IvanUkhov","id":57440,"avatar_url":"https://avatars.githubusercontent.com/u/57440?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanUkhov","html_url":"https://github.com/IvanUkhov","followers_url":"https://api.github.com/users/IvanUkhov/followers","following_url":"https://api.github.com/users/IvanUkhov/following{/other_user}","gists_url":"https://api.github.com/users/IvanUkhov/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanUkhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanUkhov/subscriptions","organizations_url":"https://api.github.com/users/IvanUkhov/orgs","repos_url":"https://api.github.com/users/IvanUkhov/repos","events_url":"https://api.github.com/users/IvanUkhov/events{/privacy}","received_events_url":"https://api.github.com/users/IvanUkhov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IvanUkhov/toml-rs","description":"A TOML encoding/decoding library for Rust","fork":true,"url":"https://api.github.com/repos/IvanUkhov/toml-rs","forks_url":"https://api.github.com/repos/IvanUkhov/toml-rs/forks","keys_url":"https://api.github.com/repos/IvanUkhov/toml-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IvanUkhov/toml-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IvanUkhov/toml-rs/teams","hooks_url":"https://api.github.com/repos/IvanUkhov/toml-rs/hooks","issue_events_url":"https://api.github.com/repos/IvanUkhov/toml-rs/issues/events{/number}","events_url":"https://api.github.com/repos/IvanUkhov/toml-rs/events","assignees_url":"https://api.github.com/repos/IvanUkhov/toml-rs/assignees{/user}","branches_url":"https://api.github.com/repos/IvanUkhov/toml-rs/branches{/branch}","tags_url":"https://api.github.com/repos/IvanUkhov/toml-rs/tags","blobs_url":"https://api.github.com/repos/IvanUkhov/toml-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IvanUkhov/toml-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IvanUkhov/toml-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/IvanUkhov/toml-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IvanUkhov/toml-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/IvanUkhov/toml-rs/languages","stargazers_url":"https://api.github.com/repos/IvanUkhov/toml-rs/stargazers","contributors_url":"https://api.github.com/repos/IvanUkhov/toml-rs/contributors","subscribers_url":"https://api.github.com/repos/IvanUkhov/toml-rs/subscribers","subscription_url":"https://api.github.com/repos/IvanUkhov/toml-rs/subscription","commits_url":"https://api.github.com/repos/IvanUkhov/toml-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/IvanUkhov/toml-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/IvanUkhov/toml-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/IvanUkhov/toml-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/IvanUkhov/toml-rs/contents/{+path}","compare_url":"https://api.github.com/repos/IvanUkhov/toml-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IvanUkhov/toml-rs/merges","archive_url":"https://api.github.com/repos/IvanUkhov/toml-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IvanUkhov/toml-rs/downloads","issues_url":"https://api.github.com/repos/IvanUkhov/toml-rs/issues{/number}","pulls_url":"https://api.github.com/repos/IvanUkhov/toml-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/IvanUkhov/toml-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/IvanUkhov/toml-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IvanUkhov/toml-rs/labels{/name}","releases_url":"https://api.github.com/repos/IvanUkhov/toml-rs/releases{/id}","created_at":"2015-07-05T00:19:05Z","updated_at":"2015-07-05T00:19:06Z","pushed_at":"2015-07-05T00:26:04Z","git_url":"git://github.com/IvanUkhov/toml-rs.git","ssh_url":"git@github.com:IvanUkhov/toml-rs.git","clone_url":"https://github.com/IvanUkhov/toml-rs.git","svn_url":"https://github.com/IvanUkhov/toml-rs","homepage":"http://alexcrichton.com/toml-rs","size":995,"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":"alexcrichton:master","ref":"master","sha":"c5119e743ca2a4d83b9f9113d785565ebbbb229e","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":21056223,"name":"toml-rs","full_name":"alexcrichton/toml-rs","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/toml-rs","description":"A TOML encoding/decoding library for Rust","fork":false,"url":"https://api.github.com/repos/alexcrichton/toml-rs","forks_url":"https://api.github.com/repos/alexcrichton/toml-rs/forks","keys_url":"https://api.github.com/repos/alexcrichton/toml-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/toml-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/toml-rs/teams","hooks_url":"https://api.github.com/repos/alexcrichton/toml-rs/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/toml-rs/events","assignees_url":"https://api.github.com/repos/alexcrichton/toml-rs/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/toml-rs/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/toml-rs/tags","blobs_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/toml-rs/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/toml-rs/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/toml-rs/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/toml-rs/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/toml-rs/subscription","commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexcrichton/toml-rs/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/toml-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/toml-rs/merges","archive_url":"https://api.github.com/repos/alexcrichton/toml-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/toml-rs/downloads","issues_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/toml-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/toml-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/toml-rs/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/toml-rs/releases{/id}","created_at":"2014-06-21T00:06:20Z","updated_at":"2015-06-24T13:26:04Z","pushed_at":"2015-06-25T21:27:30Z","git_url":"git://github.com/alexcrichton/toml-rs.git","ssh_url":"git@github.com:alexcrichton/toml-rs.git","clone_url":"https://github.com/alexcrichton/toml-rs.git","svn_url":"https://github.com/alexcrichton/toml-rs","homepage":"http://alexcrichton.com/toml-rs","size":2458,"stargazers_count":82,"watchers_count":82,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":2,"forks":29,"open_issues":2,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65"},"html":{"href":"https://github.com/alexcrichton/toml-rs/pull/65"},"issue":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/issues/65"},"comments":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/b4f1e4371929db3ba4d6a0fdad464177e28bf981"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":38,"deletions":1,"changed_files":1}}