-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor: move to rust edition 2024 #1528
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR updates the project configuration for the Rust 2024 edition while introducing new lint settings and adjusting several import orders and formatting details across multiple files.
- Update Cargo.toml files to use Rust 2024 edition, a new resolver version, and updated rust-version.
- Add unified lint configuration sections and adjust CI workflow to install the stable Rust toolchain.
- Reorder and reformat imports and error messages in several modules for improved consistency.
Reviewed Changes
File | Description |
---|---|
Cargo.toml | Update resolver version and Rust edition/version settings |
.github/workflows/ci.yml | Add step to install the Rust stable toolchain |
client/http-client/Cargo.toml | Add lint configuration |
client/transport/Cargo.toml | Add lint configuration |
client/wasm-client/Cargo.toml | Add lint configuration |
core/Cargo.toml | Add lint configuration |
client/ws-client/Cargo.toml | Add lint configuration |
client/http-client/src/transport.rs | Reorder import statements |
core/src/lib.rs | Reorder public exports for clarity |
client/transport/src/ws/mod.rs | Adjust import order and modify error message formatting |
core/src/params.rs | Simplify and reformat if-let blocks for conciseness |
client/ws-client/src/lib.rs | Reorder imports and adjust reexports |
client/http-client/src/tests.rs | Reorder imports |
client/wasm-client/src/lib.rs | Remove overly aggressive warning attributes (comments unchanged) |
benches/bench.rs | Reorder imports |
client/transport/src/web.rs | Reorder websocket import statements |
client/transport/src/lib.rs | Remove warning attributes reordering |
client/http-client/src/client.rs | Adjust import order |
client/ws-client/src/tests.rs | Reorder imports |
client/http-client/src/lib.rs | Remove warning attributes reordering |
Copilot reviewed 74 out of 74 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
client/transport/src/ws/mod.rs:431
- Consider revising this error message to include proper punctuation and clearer instructions to improve readability and usability.
let e = format!("path_and_query: {location}; this is a bug it must contain `/` please open issue");
The drop order for
if let
is a bit scary but I expect the 2024 edition lints to detect such things.