8000 Use conventional spacing for default type parameters by tcharding · Pull Request #880 · rust-bitcoin/rust-bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use conventional spacing for default type parameters #880

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

Merged

Conversation

tcharding
Copy link
Member

The exact code formatting we use is not as important as uniformity. Since we do not use tooling to control the formatting we have to be vigilant ourselves. Recently I (Tobin) changed the way default type parameters were formatted (arbitrarily but uniformly). Turns out I picked the wrong way, there is already a convention as shown in the rust documentation online (e.g. [1]).

Use 'conventional' spacing for default type parameters. Make the changeacross the whole repository, found using

git grep '\<.* = .*\>'

[1] - https://doc.rust-lang.org/book/ch19-03-advanced-traits.html

Note

I also audited our whole stack to make sure I had not botched this anywhere else. Apologies for the code churn.

@tcharding tcharding force-pushed the default-type-paramters-spacing branch from c87cc5f to db3a12b Compare March 16, 2022 21:47
@apoelstra
Copy link
Member

Needs rebase because of #806, sorry

The exact code formatting we use is not as important as uniformity.
Since we do not use tooling to control the formatting we have to be
vigilant ourselves. Recently I (Tobin) changed the way default type
parameters were formatted (arbitrarily but uniformly). Turns out I
picked the wrong way, there is already a convention as shown in the rust
documentation online (e.g. [1]).

Use 'conventional' spacing for default type parameters. Make the change
across the whole repository, found using

    git grep '\<.* = .*\>'

[1] - https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
@tcharding tcharding force-pushed the default-type-paramters-spacing branch from db3a12b to 1629348 Compare March 17, 2022 23:41
@tcharding
Copy link
Member Author

No changes in force push, rebase only.

Copy link
Collaborator
@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

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

utACK 1629348

Haven't checked that these are all cases for defaults, but anyway this is better than nothing; a small step towards rustfmt

Copy link
Member
@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 1629348

@apoelstra apoelstra merged commit 1cde71e into rust-bitcoin:master Mar 21, 2022
@tcharding tcharding deleted the default-type-paramters-spacing branch March 23, 2022 00:03
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.

3 participants
0