-
Notifications
You must be signed in to change notification settings - Fork 640
cargo fmt #771
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
cargo fmt #771
Conversation
Hey @vignesh-sankaran :) I have a few suggestions for this:
Just my suggestions — best to wait and see what @carols10cents has to say before acting on anything. Cheers! |
Yup, I agree with @elliotekj's suggestions-- do you mind making those changes @vignesh-sankaran? Please let me know if you have any questions! |
In response @elliotekj, I just used rustfmt with overwrite, I'll redo the rustfmt pass with the config file. Thanks for the tip regarding the skip attribute, I'll add that in too. No problems @carols10cents, looks like I'll fix up #575 in the process as well. EDIT: Discovered that #[rustfmt_skip] isn't going to stop rustfmt from checking the line length based off what I've seen here, and it appears to be intended behaviour. As a workaround I've set the max_length to 140 in the .rustfmt.toml, is that ok? |
This reverts commit 74a0db9.
Thank you so much!! I've merged this in, and I decided to move the documentation to CONTRIBUTING.md and I added some notes about jslint and clippy too. I also was able to get the max_width down to 118, but then I discovered the error_on_line_overflow setting, which I think does about what we want here, since the line with the super long SSL function can't be fixed or ignored. That also let me change the width to 100, which has rustfmt wrap things more nicely IMO. I also changed the default write mode to Overwrite, since that's what I usually want when I run locally. Thank you!! I'm so excited to be able to stop agonizing over the formatting!!! |
No worries @carols10cents, good to hear you'll be stressing less over code formatting :) |
Fixes #574. Ran rustfmt over the codebase, went smoothly except for this line here (https://github.com/rust-lang/crates.io/blob/master/src/db.rs#L66), but I think that there isn't much we're going to be able to do about that