{"action":"opened","number":896,"pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896","id":65019353,"html_url":"https://github.com/rust-lang-nursery/rustfmt/pull/896","diff_url":"https://github.com/rust-lang-nursery/rustfmt/pull/896.diff","patch_url":"https://github.com/rust-lang-nursery/rustfmt/pull/896.patch","issue_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/896","number":896,"state":"open","locked":false,"title":"Add fn_arg_one_line option","user":{"login":"erikjohnston","id":8428120,"avatar_url":"https://avatars.githubusercontent.com/u/8428120?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"body":"If set, arguments will be kept on one line if they fit. Currently only applies when `fn_args_layout` is set to `Block`. \r\n\r\nAddresses: #708\r\n\r\n--\r\n\r\nThis PR also fixes a bug where newlines were inserted in-between argument brackets when there were no arguments and `fn_args_layout` was set to `Block`.\r\n\r\nExample of bug:\r\n\r\n```rust\r\nfn foo(\r\n\r\n) {\r\n}\r\n```\r\n\r\n--\r\n\r\nI'm unsure about a few things:\r\n- Should this be on by default? I left it off to keep existing behaviour the same, but it doesn't look particularly nice as is.\r\n- Should this even be its own option? Should it be part of `fn_args_layout`?\r\n- The option name/description can probably be improved.\r\n\r\nHopefully none of those questions affect the implementation though.","created_at":"2016-04-01T23:45:51Z","updated_at":"2016-04-01T23:45:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896/commits","review_comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896/comments","review_comment_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/896/comments","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/statuses/57847e451af3d0057f36f61c357f5c451b4ac7ed","head":{"label":"erikjohnston:fn_arg_one_line","ref":"fn_arg_one_line","sha":"57847e451af3d0057f36f61c357f5c451b4ac7ed","user":{"login":"erikjohnston","id":8428120,"avatar_url":"https://avatars.githubusercontent.com/u/8428120?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"repo":{"id":55264887,"name":"rustfmt","full_name":"erikjohnston/rustfmt","owner":{"login":"erikjohnston","id":8428120,"avatar_url":"https://avatars.githubusercontent.com/u/8428120?v=3","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikjohnston/rustfmt","description":"Format Rust code","fork":true,"url":"https://api.github.com/repos/erikjohnston/rustfmt","forks_url":"https://api.github.com/repos/erikjohnston/rustfmt/forks","keys_url":"https://api.github.com/repos/erikjohnston/rustfmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikjohnston/rustfmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikjohnston/rustfmt/teams","hooks_url":"https://api.github.com/repos/erikjohnston/rustfmt/hooks","issue_events_url":"https://api.github.com/repos/erikjohnston/rustfmt/issues/events{/number}","events_url":"https://api.github.com/repos/erikjohnston/rustfmt/events","assignees_url":"https://api.github.com/repos/erikjohnston/rustfmt/assignees{/user}","branches_url":"https://api.github.com/repos/erikjohnston/rustfmt/branches{/branch}","tags_url":"https://api.github.com/repos/erikjohnston/rustfmt/tags","blobs_url":"https://api.github.com/repos/erikjohnston/rustfmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikjohnston/rustfmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikjohnston/rustfmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikjohnston/rustfmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikjohnston/rustfmt/statuses/{sha}","languages_url":"https://api.github.com/repos/erikjohnston/rustfmt/languages","stargazers_url":"https://api.github.com/repos/erikjohnston/rustfmt/stargazers","contributors_url":"https://api.github.com/repos/erikjohnston/rustfmt/contributors","subscribers_url":"https://api.github.com/repos/erikjohnston/rustfmt/subscribers","subscription_url":"https://api.github.com/repos/erikjohnston/rustfmt/subscription","commits_url":"https://api.github.com/repos/erikjohnston/rustfmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikjohnston/rustfmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikjohnston/rustfmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikjohnston/rustfmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikjohnston/rustfmt/contents/{+path}","compare_url":"https://api.github.com/repos/erikjohnston/rustfmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikjohnston/rustfmt/merges","archive_url":"https://api.github.com/repos/erikjohnston/rustfmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikjohnston/rustfmt/downloads","issues_url":"https://api.github.com/repos/erikjohnston/rustfmt/issues{/number}","pulls_url":"https://api.github.com/repos/erikjohnston/rustfmt/pulls{/number}","milestones_url":"https://api.github.com/repos/erikjohnston/rustfmt/milestones{/number}","notifications_url":"https://api.github.com/repos/erikjohnston/rustfmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikjohnston/rustfmt/labels{/name}","releases_url":"https://api.github.com/repos/erikjohnston/rustfmt/releases{/id}","deployments_url":"https://api.github.com/repos/erikjohnston/rustfmt/deployments","created_at":"2016-04-01T22:00:26Z","updated_at":"2016-04-01T22:00:27Z","pushed_at":"2016-04-01T23:30:58Z","git_url":"git://github.com/erikjohnston/rustfmt.git","ssh_url":"git@github.com:erikjohnston/rustfmt.git","clone_url":"https://github.com/erikjohnston/rustfmt.git","svn_url":"https://github.com/erikjohnston/rustfmt","homepage":null,"size":1687,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang-nursery:master","ref":"master","sha":"c3cef52cde49245982f044a481fd6ebbbfb7dcb5","user":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"repo":{"id":31830551,"name":"rustfmt","full_name":"rust-lang-nursery/rustfmt","owner":{"login":"rust-lang-nursery","id":14631425,"avatar_url":"https://avatars.githubusercontent.com/u/14631425?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang-nursery/rustfmt","description":"Format Rust code","fork":false,"url":"https://api.github.com/repos/rust-lang-nursery/rustfmt","forks_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/forks","keys_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/teams","hooks_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/hooks","issue_events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/events","assignees_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/tags","blobs_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/languages","stargazers_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/stargazers","contributors_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/contributors","subscribers_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/subscribers","subscription_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/subscription","commits_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/merges","archive_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/downloads","issues_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang-nursery/rustfmt/deployments","created_at":"2015-03-07T22:51:56Z","updated_at":"2016-04-01T09:37:03Z","pushed_at":"2016-04-01T22:10:07Z","git_url":"git://github.com/rust-lang-nursery/rustfmt.git","ssh_url":"git@github.com:rust-lang-nursery/rustfmt.git","clone_url":"https://github.com/rust-lang-nursery/rustfmt.git","svn_url":"https://github.com/rust-lang-nursery/rustfmt","homepage":null,"size":1838,"stargazers_count":670,"watchers_count":670,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":106,"mirror_url":null,"open_issues_count":184,"forks":106,"open_issues":184,"watchers":670,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896"},"html":{"href":"https://github.com/rust-lang-nursery/rustfmt/pull/896"},"issue":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/896"},"comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/issues/896/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/pulls/896/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang-nursery/rustfmt/statuses/57847e451af3d0057f36f61c357f5c451b4ac7ed"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":160,"deletions":7,"changed_files":6}}