Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustfmt libterm #28907

Merged
merged 1 commit into from
Nov 23, 2015
Merged

Rustfmt libterm #28907

merged 1 commit into from
Nov 23, 2015

Conversation

SingingTree
Copy link
Contributor

Hey hey,

This is the result of running rustfmt over the libterm module. The first commit reflects the unaltered changes from rustfmt, and the commit message contains some notes on areas where I thought rustfmt had behaved strangely. The second commit attempts to fix the strange areas from the first commit.

Clarification edit: there are still some areas where I think rustfmt has made changes which may merit discussion (one is noted in the comments below). My second commit only undoes the changes that I figured would not warrant discussion (based on my opinion of the style, which is of course subjective).

r? @nrc

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

},
None => return Err("bad param number".to_owned()),
}]
.clone());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@nrc
Copy link
Member

nrc commented Oct 8, 2015

r+, you'll need to add #![feature(custom_attribute)] and #![allow(unused_attributes)] to the crate root (lib.rs) to pass tests.

@SingingTree
Copy link
Contributor Author

Cool bananas, will follow up on that later today so those tests can get passing.

}
} else { return Err("stack is empty".to_owned()) },
} else {
return Err("stack is empty".to_owned())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustfmt now appends these statements with semicolons; may be worthwhile to rerun this?

@SingingTree
Copy link
Contributor Author

Cheers for the heads up. I will look at rerunning rustfmt and updating this PR.

@SingingTree
Copy link
Contributor Author

I've merged master back into this branch, removed the rustfmt_skips, and rerun rustfmt over the last commit in this branch. I don't see any particularly odd changes, and the statics are formatted without breaking the line limit. However it does result in some very long statics. I'd personally prefer the statics to remain truncated for the sake of avoiding hundreds of lines of them. Would be interested in other's thoughts on the matter.

@SingingTree
Copy link
Contributor Author

It looks like this latest batch of formatting causes a compilation failure in compiled.rs, I will investigate.

@little-dude little-dude mentioned this pull request Oct 25, 2015
@SingingTree
Copy link
Contributor Author

Not sure if I've bungled this a bit by attempting to merge master with the already made formatting. So I'm just going to reset this branch to master and repeat the formatting to make sure problems have not been introduced, and to make the work flow easier to follow.

}
};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the removal of the semi-colon here causes issues.

@bors
Copy link
Contributor

bors commented Nov 10, 2015

☔ The latest upstream changes (presumably #29546) made this pull request unmergeable. Please resolve the merge conflicts.

@SingingTree
Copy link
Contributor Author

Updated to work with upstream changes. Changes made reflect rustfmt's changes, aside from the skips in compiled.rs to avoid splitting the statics over many more lines.

@nrc
Copy link
Member

nrc commented Nov 22, 2015

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 22, 2015

📌 Commit 7d54c32 has been approved by nrc

bors added a commit that referenced this pull request Nov 22, 2015
Hey hey,

This is the result of running rustfmt over the libterm module. The first commit reflects the unaltered changes from rustfmt, and the commit message contains some notes on areas where I thought rustfmt had behaved strangely. The second commit attempts to fix the strange areas from the first commit.

Clarification edit: there are still some areas where I think rustfmt has made changes which may merit discussion (one is noted in the comments below). My second commit only undoes the changes that I figured would not warrant discussion (based on my opinion of the style, which is of course subjective).

r? @nrc
@bors
Copy link
Contributor

bors commented Nov 22, 2015

⌛ Testing commit 7d54c32 with merge 2ba4460...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants