{"action":"opened","number":260,"pull_request":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260","id":42462649,"html_url":"https://github.com/nickel-org/nickel.rs/pull/260","diff_url":"https://github.com/nickel-org/nickel.rs/pull/260.diff","patch_url":"https://github.com/nickel-org/nickel.rs/pull/260.patch","issue_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260","number":260,"state":"open","locked":false,"title":"Fix region errors uncovered by rust-lang/rust#27641","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"body":"The fixes for RFC rust-lang/rfcs#1214 uncovered some problems with how nickel was using lifetimes. These two patches correct the usage so that it will build after rustlang/rust#27641 lands. I also attempted to move away from short names like `'a` and `'k` and instead give names to meaningful lifetimes within the processing of a request. I'm not sure that I found the best names, though. \r\n\r\nFrom what I can see, the role of the lifetime parameters is as follows:\r\n\r\n`'k` -- represents the internal hyper state, such as the network connection. I called this `'conn`.\r\n\r\n`'a` and `'b` -- are both varying lifetimes that generally represent \"the shortest lifetime of any borrowed data in the Request\". Generally this is the lifetime of the \"middleware\" portion of request processing. That is, if you see the stack as looking like:\r\n\r\n```\r\n<hyper>                +---------+ 'conn\r\n                                 |\r\n<nickle>               +--+ 'mw  |\r\n                          |      |\r\n<middleware>              |      |\r\n                          v      v\r\n```","created_at":"2015-08-14T14:42:03Z","updated_at":"2015-08-14T14:42:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260/commits","review_comments_url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260/comments","review_comment_url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260/comments","statuses_url":"https://api.github.com/repos/nickel-org/nickel.rs/statuses/8feba3a5bb3b6e4f7bcde8c41834a3b35cc701fa","head":{"label":"nikomatsakis:master","ref":"master","sha":"8feba3a5bb3b6e4f7bcde8c41834a3b35cc701fa","user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"repo":{"id":40718653,"name":"nickel.rs","full_name":"nikomatsakis/nickel.rs","owner":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nikomatsakis/nickel.rs","description":"An expressjs inspired web framework for Rust","fork":true,"url":"https://api.github.com/repos/nikomatsakis/nickel.rs","forks_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/forks","keys_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/teams","hooks_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/hooks","issue_events_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/issues/events{/number}","events_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/events","assignees_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/assignees{/user}","branches_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/branches{/branch}","tags_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/tags","blobs_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/languages","stargazers_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/stargazers","contributors_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/contributors","subscribers_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/subscribers","subscription_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/subscription","commits_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/contents/{+path}","compare_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/merges","archive_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/downloads","issues_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/issues{/number}","pulls_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/labels{/name}","releases_url":"https://api.github.com/repos/nikomatsakis/nickel.rs/releases{/id}","created_at":"2015-08-14T14:18:22Z","updated_at":"2015-08-14T14:18:23Z","pushed_at":"2015-08-14T14:37:07Z","git_url":"git://github.com/nikomatsakis/nickel.rs.git","ssh_url":"git@github.com:nikomatsakis/nickel.rs.git","clone_url":"https://github.com/nikomatsakis/nickel.rs.git","svn_url":"https://github.com/nikomatsakis/nickel.rs","homepage":"http://nickel.rs","size":5598,"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":"nickel-org:master","ref":"master","sha":"3fd622f4398327c7a978101e0320141150eb59de","user":{"login":"nickel-org","id":7941614,"avatar_url":"https://avatars.githubusercontent.com/u/7941614?v=3","gravatar_id":"","url":"https://api.github.com/users/nickel-org","html_url":"https://github.com/nickel-org","followers_url":"https://api.github.com/users/nickel-org/followers","following_url":"https://api.github.com/users/nickel-org/following{/other_user}","gists_url":"https://api.github.com/users/nickel-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nickel-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickel-org/subscriptions","organizations_url":"https://api.github.com/users/nickel-org/orgs","repos_url":"https://api.github.com/users/nickel-org/repos","events_url":"https://api.github.com/users/nickel-org/events{/privacy}","received_events_url":"https://api.github.com/users/nickel-org/received_events","type":"Organization","site_admin":false},"repo":{"id":20462243,"name":"nickel.rs","full_name":"nickel-org/nickel.rs","owner":{"login":"nickel-org","id":7941614,"avatar_url":"https://avatars.githubusercontent.com/u/7941614?v=3","gravatar_id":"","url":"https://api.github.com/users/nickel-org","html_url":"https://github.com/nickel-org","followers_url":"https://api.github.com/users/nickel-org/followers","following_url":"https://api.github.com/users/nickel-org/following{/other_user}","gists_url":"https://api.github.com/users/nickel-org/gists{/gist_id}","starred_url":"https://api.github.com/users/nickel-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickel-org/subscriptions","organizations_url":"https://api.github.com/users/nickel-org/orgs","repos_url":"https://api.github.com/users/nickel-org/repos","events_url":"https://api.github.com/users/nickel-org/events{/privacy}","received_events_url":"https://api.github.com/users/nickel-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nickel-org/nickel.rs","description":"An expressjs inspired web framework for Rust","fork":false,"url":"https://api.github.com/repos/nickel-org/nickel.rs","forks_url":"https://api.github.com/repos/nickel-org/nickel.rs/forks","keys_url":"https://api.github.com/repos/nickel-org/nickel.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickel-org/nickel.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickel-org/nickel.rs/teams","hooks_url":"https://api.github.com/repos/nickel-org/nickel.rs/hooks","issue_events_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/events{/number}","events_url":"https://api.github.com/repos/nickel-org/nickel.rs/events","assignees_url":"https://api.github.com/repos/nickel-org/nickel.rs/assignees{/user}","branches_url":"https://api.github.com/repos/nickel-org/nickel.rs/branches{/branch}","tags_url":"https://api.github.com/repos/nickel-org/nickel.rs/tags","blobs_url":"https://api.github.com/repos/nickel-org/nickel.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickel-org/nickel.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickel-org/nickel.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickel-org/nickel.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickel-org/nickel.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/nickel-org/nickel.rs/languages","stargazers_url":"https://api.github.com/repos/nickel-org/nickel.rs/stargazers","contributors_url":"https://api.github.com/repos/nickel-org/nickel.rs/contributors","subscribers_url":"https://api.github.com/repos/nickel-org/nickel.rs/subscribers","subscription_url":"https://api.github.com/repos/nickel-org/nickel.rs/subscription","commits_url":"https://api.github.com/repos/nickel-org/nickel.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickel-org/nickel.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickel-org/nickel.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickel-org/nickel.rs/contents/{+path}","compare_url":"https://api.github.com/repos/nickel-org/nickel.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickel-org/nickel.rs/merges","archive_url":"https://api.github.com/repos/nickel-org/nickel.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickel-org/nickel.rs/downloads","issues_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues{/number}","pulls_url":"https://api.github.com/repos/nickel-org/nickel.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/nickel-org/nickel.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/nickel-org/nickel.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickel-org/nickel.rs/labels{/name}","releases_url":"https://api.github.com/repos/nickel-org/nickel.rs/releases{/id}","created_at":"2014-06-03T22:36:19Z","updated_at":"2015-08-14T06:16:40Z","pushed_at":"2015-08-12T11:38:39Z","git_url":"git://github.com/nickel-org/nickel.rs.git","ssh_url":"git@github.com:nickel-org/nickel.rs.git","clone_url":"https://github.com/nickel-org/nickel.rs.git","svn_url":"https://github.com/nickel-org/nickel.rs","homepage":"http://nickel.rs","size":5598,"stargazers_count":1008,"watchers_count":1008,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":78,"mirror_url":null,"open_issues_count":31,"forks":78,"open_issues":31,"watchers":1008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260"},"html":{"href":"https://github.com/nickel-org/nickel.rs/pull/260"},"issue":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260"},"comments":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/issues/260/comments"},"review_comments":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260/comments"},"review_comment":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/pulls/260/commits"},"statuses":{"href":"https://api.github.com/repos/nickel-org/nickel.rs/statuses/8feba3a5bb3b6e4f7bcde8c41834a3b35cc701fa"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":39,"deletions":33,"changed_files":8}}