Skip to content

chore: bump to rust edition 2024 #10802

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
merged 13 commits into from
Jul 3, 2025
Merged

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jun 18, 2025

Motivation

Closes: #10734

Solution

Initial commit was done as a trial run with Claude, worked quite well!

Some of the added .clone() is concerning, will look for alternative solution to deal with ownership. We are mostly dealing with Arc's and the other fields are likely light to clone.

Expecting this PR to fail its lint check, doing that in a follow-up here: #10803 as the diff is very large in terms of number of files touched

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes
Siteproxy

Verified

This commit was signed with the committer’s verified signature.
zerosnacks zerosnacks

Verified

This commit was signed with the committer’s verified signature.
zerosnacks zerosnacks

Verified

This commit was signed with the committer’s verified signature.
zerosnacks zerosnacks

Verified

This commit was signed with the committer’s verified signature.
zerosnacks zerosnacks

Verified

This commit was signed with the committer’s verified signature.
zerosnacks zerosnacks
@@ -82,7 +82,6 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2024-02-03
Copy link
Member Author

Choose a reason for hiding this comment

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

Found out we were pinning to this specific nightly, this seems unintended / resolved

@@ -46,7 +46,7 @@ pub struct HexIdProvider {

impl HexIdProvider {
/// Generates a random hex encoded Id
pub fn gen(&self) -> String {
Copy link
Member Author

Choose a reason for hiding this comment

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

gen is now a reserved keyword, found generate better than r#gen

@@ -20,7 +20,7 @@ impl Cheatcode for setEnvCall {
} else if value.contains('\0') {
Err(fmt_err!("environment variable value can't contain NUL character `\\0`"))
} else {
env::set_var(key, value);
unsafe { env::set_var(key, value); }
Copy link
Member Author

Choose a reason for hiding this comment

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

unsafe is now required for things that touch the environment

let settings = cache.profiles.get(&profile).expect("must be present");

settings
cache.profiles.get(&profile).expect("must be present")
Copy link
Member Author

Choose a reason for hiding this comment

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

clippy lint rule now enforces returning the result of a let binding from a block preferring direct returns where possible

@zerosnacks zerosnacks marked this pull request as ready for review June 19, 2025 12:44
@zerosnacks zerosnacks moved this to Ready For Review in Foundry Jun 19, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

changes look good, unsure about the additional clones

@grandizzy @DaniPopes

@zerosnacks
Copy link
Member Author

zerosnacks commented Jun 24, 2025

Closing for now given it is low priority and can be picked up at any point in the future

@zerosnacks zerosnacks closed this Jun 24, 2025
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Jun 24, 2025
@DaniPopes DaniPopes reopened this Jul 3, 2025
DaniPopes added 4 commits July 3, 2025 19:33

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
DaniPopes added 4 commits July 3, 2025 19:37

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
…rmatting anyway

Verified

This commit was signed with the committer’s verified signature.
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Unblocks let-chains

@DaniPopes DaniPopes enabled auto-merge (squash) July 3, 2025 17:46
@DaniPopes DaniPopes merged commit 710a158 into master Jul 3, 2025
42 of 44 checks passed
@DaniPopes DaniPopes deleted the zerosnacks/claude-bump-rust-2024 branch July 3, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

chore: update Rust edition to 2024
3 participants