GitHub PullRequestReviewCommentEvent at 2014-07-31 04:45:50
Repository: gfx-rs
Actor: bjz
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/comments/15626149","id":15626149,"diff_hunk":"@@ -173,57 +190,43 @@ pub enum ParameterLinkError<'a> {\n     ErrorMissingParameter(ParameterError<'a>),\n }\n \n-/// Main trait that is generated for a user data structure with the `shader_param` attribute\n+/// A trait that abstract the shader parameter structure, generated by the `shader_param` attribute\n pub trait ShaderParam<L> {\n     /// Creates a new link, self is passed as a workaround for Rust to not be lost in generics\n     fn create_link<S: ParameterSink>(&self, &mut S) -> Result<L, ParameterError<'static>>;\n-    /// Send the parameters to the device using the Uploader closures\n-    fn upload<'a>(&self, &L, FnUniform<'a>, FnBlock<'a>, FnTexture<'a>);\n+    /// Bind the parameters by invoking the corresponding closures\n+    fn bind<'a>(&self, &L, FnUniform<'a>, FnBlock<'a>, FnTexture<'a>);\n }\n \n-impl ShaderParam<()> for () {\n-    fn create_link<S: ParameterSink>(&self, _arg0: &mut S) -> Result<(), ParameterError<'static>> {\n-        Ok(())\n-    }\n-    fn upload<'a>(&self, _arg0: &(), _arg1: FnUniform<'a>,\n-                  _arg2: FnBlock<'a>, _arg3: FnTexture<'a>) { }\n-}\n-\n-/// A bundle that encapsulates a program and input to that program.\n+/// A bundle that encapsulates a program and a custom user-provided\n+/// structure containing the program parameters.","path":"src/render/shade.rs","position":49,"original_position":49,"commit_id":"d1565e3df9a0b72e428abf40acd264462f71e3b8","original_commit_id":"d1565e3df9a0b72e428abf40acd264462f71e3b8","user":{"login":"bjz","id":695077,"avatar_url":"https://avatars.githubusercontent.com/u/695077?v=1","gravatar_id":"e52a48f76fc911d40711f788d74773a0","url":"https://api.github.com/users/bjz","html_url":"https://github.com/bjz","followers_url":"https://api.github.com/users/bjz/followers","following_url":"https://api.github.com/users/bjz/following{/other_user}","gists_url":"https://api.github.com/users/bjz/gists{/gist_id}","starred_url":"https://api.github.com/users/bjz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjz/subscriptions","organizations_url":"https://api.github.com/users/bjz/orgs","repos_url":"https://api.github.com/users/bjz/repos","events_url":"https://api.github.com/users/bjz/events{/privacy}","received_events_url":"https://api.github.com/users/bjz/received_events","type":"User","site_admin":false},"body":"Could you document the type parameters? Like:\r\n\r\n~~~rust\r\n/// # Type parameters\r\n///\r\n/// * `L` - ...\r\n/// * `T` - ...\r\n~~~","created_at":"2014-07-31T04:45:50Z","updated_at":"2014-07-31T04:45:50Z","html_url":"https://github.com/gfx-rs/gfx-rs/pull/154#discussion_r15626149","pull_request_url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/comments/15626149"},"html":{"href":"https://github.com/gfx-rs/gfx-rs/pull/154#discussion_r15626149"},"pull_request":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154","id":19130861,"html_url":"https://github.com/gfx-rs/gfx-rs/pull/154","diff_url":"https://github.com/gfx-rs/gfx-rs/pull/154.diff","patch_url":"https://github.com/gfx-rs/gfx-rs/pull/154.patch","issue_url":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/154","number":154,"state":"open","title":"ProgramShell concept","user":{"login":"kvark","id":107301,"avatar_url":"https://avatars.githubusercontent.com/u/107301?v=1","gravatar_id":"b50c6d04071ea8bdff5efdd831eb147a","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"body":"This brings us closer to #150\r\n\r\nNotice how triangle example got simpler now, and also how `draw()` signature has shortened.\r\n","created_at":"2014-07-31T03:29:48Z","updated_at":"2014-07-31T04:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36ccc72dabf78553b628fe18468a4382400eb359","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154/commits","review_comments_url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154/comments","review_comment_url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/154/comments","statuses_url":"https://api.github.com/repos/gfx-rs/gfx-rs/statuses/d1565e3df9a0b72e428abf40acd264462f71e3b8","head":{"label":"kvark:shell","ref":"shell","sha":"d1565e3df9a0b72e428abf40acd264462f71e3b8","user":{"login":"kvark","id":107301,"avatar_url":"https://avatars.githubusercontent.com/u/107301?v=1","gravatar_id":"b50c6d04071ea8bdff5efdd831eb147a","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"repo":{"id":21021936,"name":"gfx-rs","full_name":"kvark/gfx-rs","owner":{"login":"kvark","id":107301,"avatar_url":"https://avatars.githubusercontent.com/u/107301?v=1","gravatar_id":"b50c6d04071ea8bdff5efdd831eb147a","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvark/gfx-rs","description":"A lightweight graphics device manager for Rust","fork":true,"url":"https://api.github.com/repos/kvark/gfx-rs","forks_url":"https://api.github.com/repos/kvark/gfx-rs/forks","keys_url":"https://api.github.com/repos/kvark/gfx-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvark/gfx-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvark/gfx-rs/teams","hooks_url":"https://api.github.com/repos/kvark/gfx-rs/hooks","issue_events_url":"https://api.github.com/repos/kvark/gfx-rs/issues/events{/number}","events_url":"https://api.github.com/repos/kvark/gfx-rs/events","assignees_url":"https://api.github.com/repos/kvark/gfx-rs/assignees{/user}","branches_url":"https://api.github.com/repos/kvark/gfx-rs/branches{/branch}","tags_url":"https://api.github.com/repos/kvark/gfx-rs/tags","blobs_url":"https://api.github.com/repos/kvark/gfx-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvark/gfx-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvark/gfx-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvark/gfx-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvark/gfx-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/kvark/gfx-rs/languages","stargazers_url":"https://api.github.com/repos/kvark/gfx-rs/stargazers","contributors_url":"https://api.github.com/repos/kvark/gfx-rs/contributors","subscribers_url":"https://api.github.com/repos/kvark/gfx-rs/subscribers","subscription_url":"https://api.github.com/repos/kvark/gfx-rs/subscription","commits_url":"https://api.github.com/repos/kvark/gfx-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvark/gfx-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvark/gfx-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvark/gfx-rs/issues/comments/{number}","contents_url":"https://api.github.com/repos/kvark/gfx-rs/contents/{+path}","compare_url":"https://api.github.com/repos/kvark/gfx-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvark/gfx-rs/merges","archive_url":"https://api.github.com/repos/kvark/gfx-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvark/gfx-rs/downloads","issues_url":"https://api.github.com/repos/kvark/gfx-rs/issues{/number}","pulls_url":"https://api.github.com/repos/kvark/gfx-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/kvark/gfx-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/kvark/gfx-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvark/gfx-rs/labels{/name}","releases_url":"https://api.github.com/repos/kvark/gfx-rs/releases{/id}","created_at":"2014-06-20T01:55:38Z","updated_at":"2014-07-06T16:08:07Z","pushed_at":"2014-07-31T03:26:34Z","git_url":"git://github.com/kvark/gfx-rs.git","ssh_url":"git@github.com:kvark/gfx-rs.git","clone_url":"https://github.com/kvark/gfx-rs.git","svn_url":"https://github.com/kvark/gfx-rs","homepage":"","size":1441,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gfx-rs:master","ref":"master","sha":"59b70a0a8bc0c00320aa4970896687fcb6940192","user":{"login":"gfx-rs","id":8213174,"avatar_url":"https://avatars.githubusercontent.com/u/8213174?v=1","gravatar_id":null,"url":"https://api.github.com/users/gfx-rs","html_url":"https://github.com/gfx-rs","followers_url":"https://api.github.com/users/gfx-rs/followers","following_url":"https://api.github.com/users/gfx-rs/following{/other_user}","gists_url":"https://api.github.com/users/gfx-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gfx-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfx-rs/subscriptions","organizations_url":"https://api.github.com/users/gfx-rs/orgs","repos_url":"https://api.github.com/users/gfx-rs/repos","events_url":"https://api.github.com/users/gfx-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gfx-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":13847975,"name":"gfx-rs","full_name":"gfx-rs/gfx-rs","owner":{"login":"gfx-rs","id":8213174,"avatar_url":"https://avatars.githubusercontent.com/u/8213174?v=1","gravatar_id":null,"url":"https://api.github.com/users/gfx-rs","html_url":"https://github.com/gfx-rs","followers_url":"https://api.github.com/users/gfx-rs/followers","following_url":"https://api.github.com/users/gfx-rs/following{/other_user}","gists_url":"https://api.github.com/users/gfx-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/gfx-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfx-rs/subscriptions","organizations_url":"https://api.github.com/users/gfx-rs/orgs","repos_url":"https://api.github.com/users/gfx-rs/repos","events_url":"https://api.github.com/users/gfx-rs/events{/privacy}","received_events_url":"https://api.github.com/users/gfx-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gfx-rs/gfx-rs","description":"A lightweight graphics device manager for Rust","fork":false,"url":"https://api.github.com/repos/gfx-rs/gfx-rs","forks_url":"https://api.github.com/repos/gfx-rs/gfx-rs/forks","keys_url":"https://api.github.com/repos/gfx-rs/gfx-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gfx-rs/gfx-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gfx-rs/gfx-rs/teams","hooks_url":"https://api.github.com/repos/gfx-rs/gfx-rs/hooks","issue_events_url":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/events{/number}","events_url":"https://api.github.com/repos/gfx-rs/gfx-rs/events","assignees_url":"https://api.github.com/repos/gfx-rs/gfx-rs/assignees{/user}","branches_url":"https://api.github.com/repos/gfx-rs/gfx-rs/branches{/branch}","tags_url":"https://api.github.com/repos/gfx-rs/gfx-rs/tags","blobs_url":"https://api.github.com/repos/gfx-rs/gfx-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gfx-rs/gfx-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gfx-rs/gfx-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gfx-rs/gfx-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gfx-rs/gfx-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/gfx-rs/gfx-rs/languages","stargazers_url":"https://api.github.com/repos/gfx-rs/gfx-rs/stargazers","contributors_url":"https://api.github.com/repos/gfx-rs/gfx-rs/contributors","subscribers_url":"https://api.github.com/repos/gfx-rs/gfx-rs/subscribers","subscription_url":"https://api.github.com/repos/gfx-rs/gfx-rs/subscription","commits_url":"https://api.github.com/repos/gfx-rs/gfx-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gfx-rs/gfx-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gfx-rs/gfx-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/comments/{number}","contents_url":"https://api.github.com/repos/gfx-rs/gfx-rs/contents/{+path}","compare_url":"https://api.github.com/repos/gfx-rs/gfx-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gfx-rs/gfx-rs/merges","archive_url":"https://api.github.com/repos/gfx-rs/gfx-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gfx-rs/gfx-rs/downloads","issues_url":"https://api.github.com/repos/gfx-rs/gfx-rs/issues{/number}","pulls_url":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/gfx-rs/gfx-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/gfx-rs/gfx-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gfx-rs/gfx-rs/labels{/name}","releases_url":"https://api.github.com/repos/gfx-rs/gfx-rs/releases{/id}","created_at":"2013-10-25T00:35:35Z","updated_at":"2014-07-30T07:07:37Z","pushed_at":"2014-07-30T01:59:38Z","git_url":"git://github.com/gfx-rs/gfx-rs.git","ssh_url":"git@github.com:gfx-rs/gfx-rs.git","clone_url":"https://github.com/gfx-rs/gfx-rs.git","svn_url":"https://github.com/gfx-rs/gfx-rs","homepage":"http://gfx-rs.github.io/","size":3057,"stargazers_count":24,"watchers_count":24,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":12,"mirror_url":null,"open_issues_count":28,"forks":12,"open_issues":28,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154"},"html":{"href":"https://github.com/gfx-rs/gfx-rs/pull/154"},"issue":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/154"},"comments":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/gfx-rs/gfx-rs/statuses/d1565e3df9a0b72e428abf40acd264462f71e3b8"}}}}