Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Format code with rustfmt #497

Merged
merged 2 commits into from
Jun 12, 2019
Merged

Format code with rustfmt #497

merged 2 commits into from
Jun 12, 2019

Conversation

sdroege
Copy link
Member

@sdroege sdroege commented Jun 10, 2019

@GuillaumeGomez you mentioned a rustfmt config you prefer over the default. Can you provide that one so it can be integrated here?

@GuillaumeGomez
Copy link
Member

That's something @alatiera might have. :)

@alatiera
Copy link
Contributor

That's something @alatiera might have. :)

What I have in my local checkout is the following:

➜  gir ✗ cat rustfmt.toml 
indent_style = "Visual"

@sdroege
Copy link
Member Author

sdroege commented Jun 10, 2019

@alatiera said it was

indent_style = "Visual"

Unfortunately configuration in rustfmt is still unstable

Warning: can't set `indent_style = Visual`, unstable features are only available in nightly channel.

So either we go with the default for now, or more waiting.

@sdroege
Copy link
Member Author

sdroege commented Jun 12, 2019

@GuillaumeGomez What do you think? Does the formatted code in this PR look fine to you until we can enable that rustfmt configuration, or do you prefer to wait (in which case we should create an issue to ask for stabilization of the configuration we need: you only require ident_style?)?

@GuillaumeGomez
Copy link
Member

I'm not a big fan but that's just minor stuff so let's go.

@sdroege
Copy link
Member Author

sdroege commented Jun 12, 2019

Ok, thanks! We can add the configuration at a later time, and in the meantime you could ask for it to be stabilized if it's important enough.

If @EPashkin is also fine with this, let's get this merged then. And then I'll prepare MRs for everything else doing the same.

@GuillaumeGomez
Copy link
Member

I opened an issue for the feature stabilization: rust-lang/rustfmt#3622

@EPashkin
Copy link
Member

👍

@sdroege sdroege merged commit b52d708 into gtk-rs:master Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants