{"action":"created","comment":{"url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/comments/238110111","pull_request_review_id":180573182,"id":238110111,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODExMDExMQ==","diff_hunk":"@@ -212,10 +256,80 @@ fn sort_posts(posts: &mut Vec<&liquid::value::Value>, config: &PaginationConfig)\n     })\n }\n \n+fn distribute_posts_by_tags<'a>(\n+    all_posts: &[&'a liquid::value::Value],\n+) -> HashMap<String, Vec<&'a liquid::value::Value>> {","path":"src/pagination.rs","position":null,"original_position":163,"commit_id":"0867424259ad3bec42700acffe137dd95bf19c22","original_commit_id":"94a558f1bc87e871273f7c5cd9dc6781cb5e8580","user":{"login":"Geobert","id":72570,"node_id":"MDQ6VXNlcjcyNTcw","avatar_url":"https://avatars1.githubusercontent.com/u/72570?v=4","gravatar_id":"","url":"https://api.github.com/users/Geobert","html_url":"https://github.com/Geobert","followers_url":"https://api.github.com/users/Geobert/followers","following_url":"https://api.github.com/users/Geobert/following{/other_user}","gists_url":"https://api.github.com/users/Geobert/gists{/gist_id}","starred_url":"https://api.github.com/users/Geobert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geobert/subscriptions","organizations_url":"https://api.github.com/users/Geobert/orgs","repos_url":"https://api.github.com/users/Geobert/repos","events_url":"https://api.github.com/users/Geobert/events{/privacy}","received_events_url":"https://api.github.com/users/Geobert/received_events","type":"User","site_admin":false},"body":"to avoid `'static` I tried to add `'a` on some functions instead:\r\n```rust\r\nfn create_tags_paginators<'a>(\r\n    all_posts: &[&'a liquid::value::Value],\r\n    doc: &Document,\r\n    pagination_cfg: &PaginationConfig,\r\n) -> Result<Vec<Paginator>> {\r\n```\r\nand \r\n```rust\r\npub fn generate_paginators<'a>(\r\n    doc: &mut Document,\r\n    posts_data: &'a [liquid::value::Value],\r\n) -> Result<Vec<Paginator>> {\r\n```\r\n\r\nand I get this error:\r\n```rust\r\nerror[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in function call due to conflicting requirements\r\n   --> src\\pagination.rs:278:24\r\n    |\r\n278 |     let mut per_tags = distribute_posts_by_tags(&all_posts)?;\r\n    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n    |\r\nnote: first, the lifetime cannot outlive the lifetime 'a as defined on the function body at 273:27...\r\n   --> src\\pagination.rs:273:27\r\n    |\r\n273 | fn create_tags_paginators<'a>(\r\n    |                           ^^\r\n    = note: ...so that the expression is assignable:\r\n            expected &[&liquid::value::Value]\r\n               found &[&'a liquid::value::Value]\r\n    = note: but, the lifetime must be valid for the static lifetime...\r\n    = note: ...so that the types are compatible:\r\n            expected std::convert::From<&str>\r\n               found std::convert::From<&'static str>\r\n```","created_at":"2018-12-02T19:02:29Z","updated_at":"2018-12-02T19:02:29Z","html_url":"https://github.com/cobalt-org/cobalt.rs/pull/548#discussion_r238110111","pull_request_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/comments/238110111"},"html":{"href":"https://github.com/cobalt-org/cobalt.rs/pull/548#discussion_r238110111"},"pull_request":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548"}},"in_reply_to_id":232454849},"pull_request":{"url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548","id":228201141,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MjAxMTQx","html_url":"https://github.com/cobalt-org/cobalt.rs/pull/548","diff_url":"https://github.com/cobalt-org/cobalt.rs/pull/548.diff","patch_url":"https://github.com/cobalt-org/cobalt.rs/pull/548.patch","issue_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/548","number":548,"state":"open","locked":false,"title":"feat(pagination): pagination on tags","user":{"login":"Geobert","id":72570,"node_id":"MDQ6VXNlcjcyNTcw","avatar_url":"https://avatars1.githubusercontent.com/u/72570?v=4","gravatar_id":"","url":"https://api.github.com/users/Geobert","html_url":"https://github.com/Geobert","followers_url":"https://api.github.com/users/Geobert/followers","following_url":"https://api.github.com/users/Geobert/following{/other_user}","gists_url":"https://api.github.com/users/Geobert/gists{/gist_id}","starred_url":"https://api.github.com/users/Geobert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geobert/subscriptions","organizations_url":"https://api.github.com/users/Geobert/orgs","repos_url":"https://api.github.com/users/Geobert/repos","events_url":"https://api.github.com/users/Geobert/events{/privacy}","received_events_url":"https://api.github.com/users/Geobert/received_events","type":"User","site_admin":false},"body":"Here is my implementation of pagination on tags (https://github.com/cobalt-org/cobalt.rs/issues/395). \r\n\r\n* `paginator.indexes` is populated with the 1st paginator of each tag.\r\n* I support multiple pages per tag.\r\n* I've added `index_title` in the paginator so we know which tag we are in.\r\n\r\nI still need to write some tests, but I'd like to start the review process as we know it will take some time reach a stable code ;)","created_at":"2018-11-04T20:38:18Z","updated_at":"2018-12-02T19:02:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f39035f0887267b214e9a3d63d076e4e39adf6fe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548/commits","review_comments_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548/comments","review_comment_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/548/comments","statuses_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/statuses/0867424259ad3bec42700acffe137dd95bf19c22","head":{"label":"Geobert:pagination_tags","ref":"pagination_tags","sha":"0867424259ad3bec42700acffe137dd95bf19c22","user":{"login":"Geobert","id":72570,"node_id":"MDQ6VXNlcjcyNTcw","avatar_url":"https://avatars1.githubusercontent.com/u/72570?v=4","gravatar_id":"","url":"https://api.github.com/users/Geobert","html_url":"https://github.com/Geobert","followers_url":"https://api.github.com/users/Geobert/followers","following_url":"https://api.github.com/users/Geobert/following{/other_user}","gists_url":"https://api.github.com/users/Geobert/gists{/gist_id}","starred_url":"https://api.github.com/users/Geobert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geobert/subscriptions","organizations_url":"https://api.github.com/users/Geobert/orgs","repos_url":"https://api.github.com/users/Geobert/repos","events_url":"https://api.github.com/users/Geobert/events{/privacy}","received_events_url":"https://api.github.com/users/Geobert/received_events","type":"User","site_admin":false},"repo":{"id":106928812,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY5Mjg4MTI=","name":"cobalt.rs","full_name":"Geobert/cobalt.rs","private":false,"owner":{"login":"Geobert","id":72570,"node_id":"MDQ6VXNlcjcyNTcw","avatar_url":"https://avatars1.githubusercontent.com/u/72570?v=4","gravatar_id":"","url":"https://api.github.com/users/Geobert","html_url":"https://github.com/Geobert","followers_url":"https://api.github.com/users/Geobert/followers","following_url":"https://api.github.com/users/Geobert/following{/other_user}","gists_url":"https://api.github.com/users/Geobert/gists{/gist_id}","starred_url":"https://api.github.com/users/Geobert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geobert/subscriptions","organizations_url":"https://api.github.com/users/Geobert/orgs","repos_url":"https://api.github.com/users/Geobert/repos","events_url":"https://api.github.com/users/Geobert/events{/privacy}","received_events_url":"https://api.github.com/users/Geobert/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Geobert/cobalt.rs","description":"Static site generator written in Rust","fork":true,"url":"https://api.github.com/repos/Geobert/cobalt.rs","forks_url":"https://api.github.com/repos/Geobert/cobalt.rs/forks","keys_url":"https://api.github.com/repos/Geobert/cobalt.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Geobert/cobalt.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Geobert/cobalt.rs/teams","hooks_url":"https://api.github.com/repos/Geobert/cobalt.rs/hooks","issue_events_url":"https://api.github.com/repos/Geobert/cobalt.rs/issues/events{/number}","events_url":"https://api.github.com/repos/Geobert/cobalt.rs/events","assignees_url":"https://api.github.com/repos/Geobert/cobalt.rs/assignees{/user}","branches_url":"https://api.github.com/repos/Geobert/cobalt.rs/branches{/branch}","tags_url":"https://api.github.com/repos/Geobert/cobalt.rs/tags","blobs_url":"https://api.github.com/repos/Geobert/cobalt.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Geobert/cobalt.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Geobert/cobalt.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Geobert/cobalt.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Geobert/cobalt.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/Geobert/cobalt.rs/languages","stargazers_url":"https://api.github.com/repos/Geobert/cobalt.rs/stargazers","contributors_url":"https://api.github.com/repos/Geobert/cobalt.rs/contributors","subscribers_url":"https://api.github.com/repos/Geobert/cobalt.rs/subscribers","subscription_url":"https://api.github.com/repos/Geobert/cobalt.rs/subscription","commits_url":"https://api.github.com/repos/Geobert/cobalt.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Geobert/cobalt.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Geobert/cobalt.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Geobert/cobalt.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Geobert/cobalt.rs/contents/{+path}","compare_url":"https://api.github.com/repos/Geobert/cobalt.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Geobert/cobalt.rs/merges","archive_url":"https://api.github.com/repos/Geobert/cobalt.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Geobert/cobalt.rs/downloads","issues_url":"https://api.github.com/repos/Geobert/cobalt.rs/issues{/number}","pulls_url":"https://api.github.com/repos/Geobert/cobalt.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/Geobert/cobalt.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/Geobert/cobalt.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Geobert/cobalt.rs/labels{/name}","releases_url":"https://api.github.com/repos/Geobert/cobalt.rs/releases{/id}","deployments_url":"https://api.github.com/repos/Geobert/cobalt.rs/deployments","created_at":"2017-10-14T13:11:49Z","updated_at":"2018-11-12T21:25:50Z","pushed_at":"2018-11-27T20:55:07Z","git_url":"git://github.com/Geobert/cobalt.rs.git","ssh_url":"git@github.com:Geobert/cobalt.rs.git","clone_url":"https://github.com/Geobert/cobalt.rs.git","svn_url":"https://github.com/Geobert/cobalt.rs","homepage":"","size":1504,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cobalt-org:master","ref":"master","sha":"2f871df2b9ec92b6ed1df61abbfcd6a0865246d9","user":{"login":"cobalt-org","id":9417410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0MTc0MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/9417410?v=4","gravatar_id":"","url":"https://api.github.com/users/cobalt-org","html_url":"https://github.com/cobalt-org","followers_url":"https://api.github.com/users/cobalt-org/followers","following_url":"https://api.github.com/users/cobalt-org/following{/other_user}","gists_url":"https://api.github.com/users/cobalt-org/gists{/gist_id}","starred_url":"https://api.github.com/users/cobalt-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobalt-org/subscriptions","organizations_url":"https://api.github.com/users/cobalt-org/orgs","repos_url":"https://api.github.com/users/cobalt-org/repos","events_url":"https://api.github.com/users/cobalt-org/events{/privacy}","received_events_url":"https://api.github.com/users/cobalt-org/received_events","type":"Organization","site_admin":false},"repo":{"id":25877885,"node_id":"MDEwOlJlcG9zaXRvcnkyNTg3Nzg4NQ==","name":"cobalt.rs","full_name":"cobalt-org/cobalt.rs","private":false,"owner":{"login":"cobalt-org","id":9417410,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0MTc0MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/9417410?v=4","gravatar_id":"","url":"https://api.github.com/users/cobalt-org","html_url":"https://github.com/cobalt-org","followers_url":"https://api.github.com/users/cobalt-org/followers","following_url":"https://api.github.com/users/cobalt-org/following{/other_user}","gists_url":"https://api.github.com/users/cobalt-org/gists{/gist_id}","starred_url":"https://api.github.com/users/cobalt-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cobalt-org/subscriptions","organizations_url":"https://api.github.com/users/cobalt-org/orgs","repos_url":"https://api.github.com/users/cobalt-org/repos","events_url":"https://api.github.com/users/cobalt-org/events{/privacy}","received_events_url":"https://api.github.com/users/cobalt-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cobalt-org/cobalt.rs","description":"Static site generator written in Rust","fork":false,"url":"https://api.github.com/repos/cobalt-org/cobalt.rs","forks_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/forks","keys_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/teams","hooks_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/hooks","issue_events_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/events{/number}","events_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/events","assignees_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/assignees{/user}","branches_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/branches{/branch}","tags_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/tags","blobs_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/statuses/{sha}","languages_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/languages","stargazers_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/stargazers","contributors_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/contributors","subscribers_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/subscribers","subscription_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/subscription","commits_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/contents/{+path}","compare_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/merges","archive_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/downloads","issues_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues{/number}","pulls_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls{/number}","milestones_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/milestones{/number}","notifications_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/labels{/name}","releases_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/releases{/id}","deployments_url":"https://api.github.com/repos/cobalt-org/cobalt.rs/deployments","created_at":"2014-10-28T16:04:40Z","updated_at":"2018-12-02T16:57:38Z","pushed_at":"2018-12-01T20:22:35Z","git_url":"git://github.com/cobalt-org/cobalt.rs.git","ssh_url":"git@github.com:cobalt-org/cobalt.rs.git","clone_url":"https://github.com/cobalt-org/cobalt.rs.git","svn_url":"https://github.com/cobalt-org/cobalt.rs","homepage":"https://cobalt-org.github.io/","size":1554,"stargazers_count":659,"watchers_count":659,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":72,"open_issues":57,"watchers":659,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548"},"html":{"href":"https://github.com/cobalt-org/cobalt.rs/pull/548"},"issue":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/548"},"comments":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/issues/548/comments"},"review_comments":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548/comments"},"review_comment":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/pulls/548/commits"},"statuses":{"href":"https://api.github.com/repos/cobalt-org/cobalt.rs/statuses/0867424259ad3bec42700acffe137dd95bf19c22"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Geobert"}}