refactor(driver): require Default for Control#859
Merged
George-Miao merged 1 commit intocompio-rs:masterfrom Apr 13, 2026
Merged
refactor(driver): require Default for Control#859George-Miao merged 1 commit intocompio-rs:masterfrom
George-Miao merged 1 commit intocompio-rs:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors driver operation control initialization by requiring Default for OpCode::Control and switching init to initialize an existing control value in-place, enabling control storage to be created up-front.
Changes:
- Updated all
OpCode::initimplementations to the newfn init(&mut self, ctrl: &mut Self::Control)signature. - Added
Defaultimplementations/derives for multipleControltypes (andSysSlice) to satisfy the new trait bound. - Refactored
Carrierto store initialized control state directly (removingMaybeUninitflow) and to initialize based on storedDriverType.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| compio-runtime/tests/event.rs | Updates test opcode init signature to in-place control init |
| compio-runtime/src/fd/poll_fd/windows.rs | Updates Windows event opcode init signature |
| compio-process/src/windows.rs | Updates process wait opcode init signature |
| compio-fs/src/stdio/windows.rs | Updates stdio blocking opcodes init signature |
| compio-driver/tests/splice.rs | Updates splice test opcode init signature |
| compio-driver/src/sys_slice.rs | Adds Default for SysSlice; updates construction docs |
| compio-driver/src/sys/unix_op.rs | Adds Default for various vectored/msg controls and switches to in-place control creation |
| compio-driver/src/sys/stub/op.rs | Updates stub opcodes to new init signature |
| compio-driver/src/sys/stub/mod.rs | Requires Control: Default and changes init signature in stub trait |
| compio-driver/src/sys/poll/op.rs | Updates poll driver ops to new init signature; adds Default for AIO controls |
| compio-driver/src/sys/poll/mod.rs | Requires Control: Default and changes init signature in poll trait |
| compio-driver/src/sys/iour/op/mod.rs | Updates io_uring ops to new init signature; introduces SmallVec for slices |
| compio-driver/src/sys/iour/op/managed.rs | Updates managed io_uring ops to in-place control init; adds control defaults |
| compio-driver/src/sys/iour/mod.rs | Requires Control: Default and changes init signature in io_uring trait |
| compio-driver/src/sys/iocp/op.rs | Updates IOCP ops to new init signature; derives Default for several controls |
| compio-driver/src/sys/iocp/mod.rs | Requires Control: Default and changes init signature in IOCP trait |
| compio-driver/src/sys/fusion/op.rs | Updates fusion wrappers to forward new init signature |
| compio-driver/src/key.rs | Switches Carrier creation/init flow to new API |
| compio-driver/src/control.rs | Refactors Carrier to store initialized control directly and init in-place |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cb62f59 to
7b5751d
Compare
7b5751d to
6a8a484
Compare
Berrysoft
approved these changes
Apr 13, 2026
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.
Close #741, again