feat: update edition to 2024#543
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust edition from 2021 to 2024 across the workspace, implementing all necessary code changes to comply with the new edition's stricter safety requirements and modern language features.
Key Changes:
- Updated edition to 2024 in workspace Cargo.toml
- Wrapped all unsafe operations in explicit
unsafeblocks as required by edition 2024 - Standardized safety documentation comments to use uppercase
SAFETY: - Adopted let-chain syntax (
if let ... && let ...) replacing nested if-let patterns - Added explicit capture syntax (
+ use<T>) to impl trait return types - Removed redundant
ref mutpatterns in match expressions
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated workspace edition from "2021" to "2024" |
| compio/tests/runtime.rs | Wrapped unsafe method calls in explicit unsafe blocks |
| compio-runtime/tests/custom_loop.rs | Added unsafe block for KillTimer call |
| compio-runtime/src/runtime/send_wrapper.rs | Standardized SAFETY comment style |
| compio-runtime/src/runtime/mod.rs | Added + use<T> bounds to impl Future return types |
| compio-runtime/src/runtime/buffer_pool.rs | Updated SAFETY comment style |
| compio-runtime/src/attacher.rs | Added unsafe blocks and enhanced safety documentation |
| compio-quic/src/socket.rs | Refactored to use let-chain syntax |
| compio-quic/src/endpoint.rs | Simplified ManuallyDrop usage pattern |
| compio-process/src/lib.rs | Wrapped pre_exec call in unsafe block |
| compio-net/src/udp.rs | Wrapped socket option calls in unsafe blocks |
| compio-net/src/socket.rs | Wrapped assume_init calls in unsafe blocks |
| compio-net/src/resolve/windows.rs | Added unsafe blocks and let-chain syntax |
| compio-net/src/cmsg/windows.rs | Wrapped all unsafe operations in explicit blocks |
| compio-net/src/cmsg/unix.rs | Wrapped unsafe libc calls in explicit blocks |
| compio-net/src/cmsg/mod.rs | Wrapped data() call in unsafe block |
| compio-macros/src/item_fn.rs | Adopted let-chain syntax |
| compio-io/src/read/ext.rs | Updated SAFETY comment style |
| compio-io/src/compat/async_stream.rs | Updated SAFETY comment style |
| compio-io/src/buffer.rs | Wrapped set_buf_init call in unsafe block |
| compio-fs/src/stdio/windows.rs | Wrapped get_unchecked_mut and updated SAFETY comments |
| compio-fs/src/named_pipe.rs | Updated SAFETY comment style |
| compio-fs/src/async_fd.rs | Enhanced safety documentation and wrapped unsafe calls |
| compio-driver/src/unix/op.rs | Wrapped io_slices and io_slices_mut calls in unsafe blocks |
| compio-driver/src/stub/mod.rs | Removed unsafe qualifier from poll method signature |
| compio-driver/src/poll/op.rs | Updated SAFETY comments and wrapped unsafe operations |
| compio-driver/src/poll/mod.rs | Adopted let-chain syntax and wrapped unsafe operations |
| compio-driver/src/op.rs | Updated SAFETY comment style |
| compio-driver/src/lib.rs | Wrapped FromRawFd/Handle/Socket implementations and updated comments |
| compio-driver/src/key.rs | Wrapped unsafe operations in explicit blocks |
| compio-driver/src/iour/op.rs | Updated SAFETY comments and enhanced documentation |
| compio-driver/src/iour/mod.rs | Removed unsafe qualifier from poll and wrapped unsafe call |
| compio-driver/src/iocp/wait/thread_pool.rs | Added SAFETY comment and unsafe block |
| compio-driver/src/iocp/op.rs | Wrapped all Windows API calls in unsafe blocks with SAFETY comments |
| compio-driver/src/iocp/mod.rs | Adopted let-chain syntax and removed unsafe from poll signature |
| compio-driver/src/iocp/cp/mod.rs | Adopted let-chain syntax for cleaner conditional logic |
| compio-driver/src/fusion/op.rs | Removed redundant ref mut patterns from match expressions |
| compio-driver/src/fusion/mod.rs | Removed unsafe from poll signature and wrapped release_buffer_pool |
| compio-driver/src/fd/mod.rs | Simplified ManuallyDrop pattern and wrapped unsafe operations |
| compio-driver/src/buffer_pool/iour.rs | Wrapped get_buf calls and updated SAFETY comments |
| compio-driver/src/buffer_pool/fallback.rs | Updated SAFETY comments throughout |
| compio-driver/src/asyncify.rs | Updated SAFETY comment style |
| compio-buf/src/uninit.rs | Wrapped set_buf_init call in unsafe block |
| compio-buf/src/slice.rs | Wrapped iter_io_buffer calls and pointer arithmetic in unsafe blocks |
| compio-buf/src/io_vec_buf.rs | Wrapped all iter_io_buffer and set_buf_init calls |
| compio-buf/src/io_slice.rs | Enhanced safety documentation for from_slice methods |
| compio-buf/src/io_buf.rs | Enhanced SetBufInit documentation and wrapped all unsafe operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AsakuraMizu
reviewed
Nov 26, 2025
Collaborator
AsakuraMizu
left a comment
There was a problem hiding this comment.
Does this PR need to be reviewed file by file?
Member
Author
|
Check the summary from copilot if you want to review quickly? |
This was referenced Jan 28, 2026
Merged
Closed
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #541