Skip to content

Refactor: Modernize codebase with edition 2024#453

Merged
NSoiffer merged 2 commits intodaisy:mainfrom
moritz-gross:cargo-edition-2024
Jan 9, 2026
Merged

Refactor: Modernize codebase with edition 2024#453
NSoiffer merged 2 commits intodaisy:mainfrom
moritz-gross:cargo-edition-2024

Conversation

@moritz-gross
Copy link
Contributor

@moritz-gross moritz-gross commented Jan 8, 2026

I was looking a bit through the Rust code and saw that MathCAT is still on Rust edition 2018.
The latest stable edition seems to be 2024.

It has some nice new stuff apparently (including basic things like compiler improvements), but most of it is too advanced for me for now (let's see in a few weeks), so I only fixed the incompatibilities:

  • in src/canonicalize.rs, the borrowing now needs to be explicit
  • in src/interface.rs, setting an environment variable has to be manually marked as unsafe
  • in src/speech.rs, the ref keyword is not allowed there because it's redundant

From my understanding, a main theme of edition 2024 is making code more consistent, for example as we already have &Yaml, so there shouldn't be an explicit borrowing-operator when it is already implicitly given.

@NSoiffer NSoiffer merged commit 79f284e into daisy:main Jan 9, 2026
1 of 3 checks passed
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