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

Run rustfmt #22

Closed
wants to merge 2 commits into from
Closed

Conversation

steveklabnik
Copy link
Contributor

Please review carefully, as rustfmt is still under development and it might be a bit weird in places. We can fix anything that looks odd.

Includes #21 because it turns out it matters.

@nrc made a great tool, so use it for formatting.
Ok(m) => { m }
Ok(m) => {
m
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this might be worse

@steveklabnik
Copy link
Contributor Author

/cc @nrc

*reftype == "tags") => branch,
_ => return Err("could not unpack `ref`"),
}
.to_string()

Choose a reason for hiding this comment

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

This should be fixed in the latest rustfmt

@brianloveswords
Copy link
Owner

Is rustfmt making decisions based on an RFC? I'm wondering if some of the rules that led it to changes just indentation level could/should be implemented in https://github.com/rust-lang/rust-mode

Ok(v) => Some(v),
Err(err) => return Err(err),
},
Ok(v) => Some(v),
Copy link
Owner

Choose a reason for hiding this comment

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

@steveklabnik This one and the one below also look wrong to me

@brianloveswords
Copy link
Owner

I cherry-picked the parts I was sure made an improvement (most of the changes) but broke the merge by rearranging some use statements and hand-editing some other parts!

@nrc
Copy link

nrc commented Oct 23, 2015

@brianloveswords there has been one RFC for function decls, but it was inconclusive. Rustfmt is heavily customisable at the moment. Once it is working really well (can be run reliably on the main repo, for example) and thus it is easy to do mass changes to formatting, I'll start more RFCs to nail down the style.

@brianloveswords
Copy link
Owner

Closing this because I pulled out the relevant stuff, thanks for pointing me towards rustfmt @steveklabnik (and thanks for making it @nrc!). I'll keep running it as I work on this and file any issues I see with the results 👍

@steveklabnik
Copy link
Contributor Author

👍

@jamesplease
Copy link

I read this as "rust, fml"

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.

5 participants