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

chore(general): Rust 2024 edition #218

Closed
wants to merge 6 commits into from
Closed

Conversation

stanislav-tkach
Copy link
Member

@stanislav-tkach stanislav-tkach commented Feb 22, 2025

Description

  • Use Rust 2024 edition.
  • Update rand to the 0.9 version.

Description of Changes

The rand was updated because gen is now a keyword, so r#gen must be used instead and it is awkward.

I have applied the updated 2024 formatting in a separate commit, so the corresponding changes can easily be expected and reverted if we decide to stick with the 2021 formatting edition. Personally I like the new formatting, but the diff is rather big. The changes fall into one of the following three categories:

  • Weird spaces were removed, for example:
    - oid!(1.2.840 .113549 .1 .9 .1)
    + oid!(1.2.840.113549.1.9.1)
  • A different (better?) long lines splitting, for example:
    - if len != 2 {
    -     return Err(decode::Error::message(format!("Invalid length for CIP36 Key Registration voting key delegations, expected 2, got {len}")));
    - }
    + if len != 2 {
    +     return Err(decode::Error::message(format!(
    +         "Invalid length for CIP36 Key Registration voting key delegations, expected 2, got {len}"
    +     ))); 
    + }
  • A slightly different sorting order for imports.

Related Pull Requests

input-output-hk/catalyst-ci#384

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach
@stanislav-tkach stanislav-tkach added the do not merge yet PR is not ready to merge yet label Feb 22, 2025
@stanislav-tkach stanislav-tkach changed the title 2024 edition chore(general): Rust 2024 edition Feb 22, 2025

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach
@@ -1,6 +1,7 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.37 AS rust-ci
# TODO: FIXME: Use release instead of branch
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:2024-edition AS rust-ci
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be cahnged.

Verified

This commit was signed with the committer’s verified signature.
stanislav-tkach Stanislav Tkach
@stanislav-tkach
Copy link
Member Author

Blocked with this issue: al8n/fmmap#7

@stevenj
Copy link
Collaborator

stevenj commented Feb 22, 2025

This PR is being closed, it is not to be worked on further as bumping the rust edition has not been approved or prioritized.

@stevenj stevenj closed this Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet PR is not ready to merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants