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: format comments #5744

Merged
merged 7 commits into from
Nov 8, 2023
Merged

rustfmt: format comments #5744

merged 7 commits into from
Nov 8, 2023

Conversation

buffalojoec
Copy link
Contributor

@buffalojoec buffalojoec commented Nov 7, 2023

This PR adds comment formatting configurations to the repository's rustfmt.toml file, and the associated changes from cargo +nightly fmt --all.

Comment width 80.

Copy link
Contributor Author

@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from 9974918 to 7ab732b Compare November 7, 2023 11:14
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from 369f733 to c302e9c Compare November 7, 2023 11:14
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from 7ab732b to 866e3bf Compare November 7, 2023 11:31
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from c302e9c to ff38393 Compare November 7, 2023 11:31
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from 866e3bf to f1571f5 Compare November 7, 2023 12:01
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from ff38393 to c01a2d1 Compare November 7, 2023 12:01
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from f1571f5 to 88907a4 Compare November 7, 2023 12:36
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from c01a2d1 to 3210d34 Compare November 7, 2023 14:16
@buffalojoec buffalojoec marked this pull request as ready for review November 7, 2023 14:16
@buffalojoec buffalojoec requested a review from joncinque November 7, 2023 15:26
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

There's definitely some rough edges, but I think we'll eventually be able to land this! There were a lot of places that created weirdness, and sometimes my review comments are a bit terse, so please don't take them negatively. Once we cleanup those bits, this should be good to go. Please do it in new commits so that I don't have to go through the whole thing again 🙏

token/program-2022/src/extension/transfer_fee/mod.rs Outdated Show resolved Hide resolved
token/program-2022/src/instruction.rs Outdated Show resolved Hide resolved
token/program-2022/src/processor.rs Outdated Show resolved Hide resolved
token/transfer-hook/interface/src/instruction.rs Outdated Show resolved Hide resolved
token/program/src/instruction.rs Show resolved Hide resolved
token-swap/program/src/instruction.rs Outdated Show resolved Hide resolved
token-swap/program/src/instruction.rs Outdated Show resolved Hide resolved
token/cli/src/main.rs Outdated Show resolved Hide resolved
@buffalojoec
Copy link
Contributor Author

Once we cleanup those bits, this should be good to go.

😅 😅 😅

I will probably not do this right away hah.

Thanks for a thorough review though!

@joncinque
Copy link
Contributor

I will probably not do this right away hah.

Please do it on the sooner side to avoid merge conflicts later! I really don't want to go through all of this again.

@buffalojoec
Copy link
Contributor Author

Please do it on the sooner side to avoid merge conflicts later!

Ah nuts.

@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from 88907a4 to 0413540 Compare November 8, 2023 10:32
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from 3210d34 to 39aca11 Compare November 8, 2023 10:32
@buffalojoec
Copy link
Contributor Author

Holy schmoly,

done

@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from 39aca11 to e49bd7c Compare November 8, 2023 11:15
joncinque
joncinque previously approved these changes Nov 8, 2023
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Great job! You deserve the biggest salute

salute

Comment on lines +14 to +15
// Start Governance custom errors from 500 to avoid conflicts with programs
// invoked via CPI
Copy link
Contributor

Choose a reason for hiding this comment

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

Much better!

/// 6. `[signer]` Payer
/// 7. `[]` bpf_upgradeable_loader program
/// 8. `[]` System program
/// 9. `[]` Sysvar Rent
/// 10. `[signer]` Governance authority
/// 11. `[]` RealmConfig account. PDA seeds: ['realm-config', realm]
/// 11. `[]` RealmConfig account.
/// * PDA seeds: ['realm-config', realm]
Copy link
Contributor

Choose a reason for hiding this comment

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

I really like these!

Copy link
Contributor Author

buffalojoec commented Nov 8, 2023

Merge activity

@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_imports branch from 0413540 to 4005ab6 Compare November 8, 2023 20:37
Base automatically changed from 11-07-rustfmt_format_imports to master November 8, 2023 20:38
@buffalojoec buffalojoec force-pushed the 11-07-rustfmt_format_comments branch from e49bd7c to b0f135a Compare November 8, 2023 20:38
@mergify mergify bot dismissed joncinque’s stale review November 8, 2023 20:39

Pull request has been modified.

@buffalojoec buffalojoec merged commit 6edf3ec into master Nov 8, 2023
69 checks passed
@buffalojoec buffalojoec deleted the 11-07-rustfmt_format_comments branch November 8, 2023 20:41
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.

2 participants