Skip to content

Migrate to Rust 1.95.0 / Edition 2024#107

Open
petamoriken wants to merge 1 commit into
RustAudio:masterfrom
petamoriken:chore/update-rust-version-and-edition
Open

Migrate to Rust 1.95.0 / Edition 2024#107
petamoriken wants to merge 1 commit into
RustAudio:masterfrom
petamoriken:chore/update-rust-version-and-edition

Conversation

@petamoriken
Copy link
Copy Markdown

The changes are as follows:

  • Remove extern crate declarations
  • Add crate:: prefix to internal module paths
  • Rename macro_rules! try to try_from (reserved keyword in Edition 2018+)
  • Replace static lookup tables and test data with const
  • Wrap unsafe operations in explicit unsafe {} blocks (unsafe_op_in_unsafe_fn)
  • Add build.rs to register #[cfg(cargo_c)]
  • Add dep: prefix to optional dependencies in [features]
  • Update .rustfmt.toml (removed deprecated options)

Accidentally, the code updates and formatting were combined into a single commit. I apologize for making it difficult to read.

- Remove `extern crate` declarations
- Add `crate::` prefix to internal module paths
- Rename macro_rules! `try` to `try_from` (reserved keyword in Edition 2018+)
- Replace `static` lookup tables and test data with `const`
- Wrap unsafe operations in explicit `unsafe {}` blocks (unsafe_op_in_unsafe_fn)
- Add build.rs to register `#[cfg(cargo_c)]`
- Add `dep:` prefix to optional dependencies in [features]
- Update .rustfmt.toml
@petamoriken
Copy link
Copy Markdown
Author

I ran cargo fmt while overlooking the following part of rustfmt.toml:

# Note that this rustfmt file only provides rough
# guidelines about how the style should be.
# Right now, rustfmt is not capable to map all
# demands to the code style (yet).

What approach should I take to fix this?

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.

1 participant