{"action":"created","issue":{"url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/39","labels_url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/39/comments","events_url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/39/events","html_url":"https://github.com/spacejam/rust-rocksdb/pull/39","id":123954030,"number":39,"title":"More idiomatic iterators?","user":{"login":"petehunt","id":239742,"avatar_url":"https://avatars.githubusercontent.com/u/239742?v=3","gravatar_id":"","url":"https://api.github.com/users/petehunt","html_url":"https://github.com/petehunt","followers_url":"https://api.github.com/users/petehunt/followers","following_url":"https://api.github.com/users/petehunt/following{/other_user}","gists_url":"https://api.github.com/users/petehunt/gists{/gist_id}","starred_url":"https://api.github.com/users/petehunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petehunt/subscriptions","organizations_url":"https://api.github.com/users/petehunt/orgs","repos_url":"https://api.github.com/users/petehunt/repos","events_url":"https://api.github.com/users/petehunt/events{/privacy}","received_events_url":"https://api.github.com/users/petehunt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-27T00:07:09Z","updated_at":"2016-01-04T08:22:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spacejam/rust-rocksdb/pulls/39","html_url":"https://github.com/spacejam/rust-rocksdb/pull/39","diff_url":"https://github.com/spacejam/rust-rocksdb/pull/39.diff","patch_url":"https://github.com/spacejam/rust-rocksdb/pull/39.patch"},"body":"I had an issue where I wanted to store a reference to a `SubDBIterator` on a struct. Because it's created from a `DBIterator`, I ran into an issue where I couldn't store a reference to both the iterator and sub-iterator on the same struct, and couldn't get the `DBIterator` instance to live long enough (see: https://internals.rust-lang.org/t/self-referencing-structs/418)\r\n\r\nThis PR merges `SubDBIterator` into `DBIterator`. While I was working on it, I fixed a few todos in the code (the DB lifetime one was also confusing).\r\n\r\nI can't think of a better name for the `IteratorMode` enum. Also, I am a rust newb :)"},"comment":{"url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/comments/168608839","html_url":"https://github.com/spacejam/rust-rocksdb/pull/39#issuecomment-168608839","issue_url":"https://api.github.com/repos/spacejam/rust-rocksdb/issues/39","id":168608839,"user":{"login":"spacejam","id":1505488,"avatar_url":"https://avatars.githubusercontent.com/u/1505488?v=3","gravatar_id":"","url":"https://api.github.com/users/spacejam","html_url":"https://github.com/spacejam","followers_url":"https://api.github.com/users/spacejam/followers","following_url":"https://api.github.com/users/spacejam/following{/other_user}","gists_url":"https://api.github.com/users/spacejam/gists{/gist_id}","starred_url":"https://api.github.com/users/spacejam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacejam/subscriptions","organizations_url":"https://api.github.com/users/spacejam/orgs","repos_url":"https://api.github.com/users/spacejam/repos","events_url":"https://api.github.com/users/spacejam/events{/privacy}","received_events_url":"https://api.github.com/users/spacejam/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T08:22:38Z","updated_at":"2016-01-04T08:22:38Z","body":"Thanks!  I'll cut `0.3.0` now with your improvements!"}}