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

frame/proc-macro: Refactor code for better readability #4712

Merged
merged 8 commits into from
Jun 8, 2024

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Jun 5, 2024

Small refactoring PR to improve the readability of the proc macros.

  • small improvement in docs
  • use new let Some(..) else expression
  • removed extra indentations by early returns

Discovered during metadata v16 poc, extracted from: #4358

@lexnv lexnv added A1-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). R0-silent Changes should not be mentioned in any release notes I4-refactor Code needs refactoring. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Jun 5, 2024
@lexnv lexnv self-assigned this Jun 5, 2024
@lexnv lexnv requested a review from a team as a code owner June 5, 2024 14:23
@kianenigma kianenigma requested a review from gupnik June 7, 2024 06:53
@gupnik
Copy link
Contributor

gupnik commented Jun 8, 2024

bot fmt

@command-bot
Copy link

command-bot bot commented Jun 8, 2024

@gupnik https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6426854 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 15-3f139a32-3dc6-470a-b9f0-862aa9bd4453 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Jun 8, 2024

@gupnik Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6426854 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6426854/artifacts/download.

@gupnik gupnik enabled auto-merge June 8, 2024 07:08
@gupnik gupnik added this pull request to the merge queue Jun 8, 2024
Merged via the queue into master with commit 07cfcf0 Jun 8, 2024
155 of 156 checks passed
@gupnik gupnik deleted the lexnv/frame-proc-refactor branch June 8, 2024 08:14
ordian added a commit that referenced this pull request Jun 13, 2024
* master: (29 commits)
  Append overlay optimization. (#1223)
  finalization: Skip tree route calculation if no forks present (#4721)
  Remove unncessary call remove_from_peers_set (#4742)
  add pov-recovery unit tests and support for elastic scaling (#4733)
  approval-voting: Add no shows debug information (#4726)
  Revamp the Readme of the parachain template (#4713)
  Update README.md to move the PSVM link under a "Tooling" section under the "Releases" section (#4734)
  frame/proc-macro: Refactor code for better readability (#4712)
  Contracts:  update wasmi to 0.32 (#3679)
  Backport style changes from P<>K bridge to R<>W bridge (#4732)
  New reference doc for Custom RPC V2 (#4654)
  Frame Pallets: Clean a lot of test setups (#4642)
  Fix occupied core handling (#4691)
  statement-distribution: Fix false warning (#4727)
  Update the README to include a link to the Polkadot SDK Version Manager (#4718)
  Cleanup PVF artifact by cache limit and stale time (#4662)
  Update link to a latest polkadot release (#4711)
  [CI] Delete cargo-deny config (#4677)
  fix build on MacOS: bump secp256k1 and secp256k1-sys to patched versions (#4709)
  Unify dependency aliases (#4633)
  ...
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
Small refactoring PR to improve the readability of the proc macros.
- small improvement in docs
- use new `let Some(..) else` expression
- removed extra indentations by early returns

Discovered during metadata v16 poc, extracted from:
paritytech#4358

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: gupnik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A1-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. I4-refactor Code needs refactoring. R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants