Skip to content

refactor(driver): shared fd - #661

Merged
George-Miao merged 1 commit into
compio-rs:masterfrom
George-Miao:refactor/driver/shared-fd
Feb 5, 2026
Merged

George-Miao merged 1 commit into
compio-rs:masterfrom
George-Miao:refactor/driver/shared-fd

Conversation

@George-Miao

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 05:31
@George-Miao George-Miao self-assigned this Feb 5, 2026
@George-Miao George-Miao added package: driver Related to compio-driver refactor Refactoring existing code labels Feb 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the SharedFd implementation in the driver module to improve code maintainability by extracting common logic into a helper method.

Changes:

  • Introduced into_inner helper method to extract the inner Shared<Inner<T>> from SharedFd<T>
  • Simplified try_unwrap to use the new into_inner helper
  • Refactored take method to use into_inner and eliminate the unsafe try_unwrap_inner helper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Berrysoft Berrysoft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There's similar code in compio-quic, for EndpointRef. Could you also refactor for it?

@George-Miao

Copy link
Copy Markdown
Member Author

EndpointRef

Sure. Will open another PR for that.

@George-Miao
George-Miao requested a review from Berrysoft February 5, 2026 06:13

@Berrysoft Berrysoft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Genius!

@George-Miao
George-Miao merged commit 2f59959 into compio-rs:master Feb 5, 2026
60 checks passed
@George-Miao
George-Miao deleted the refactor/driver/shared-fd branch February 5, 2026 06:15
@github-actions github-actions Bot mentioned this pull request Feb 5, 2026
This was referenced Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: driver Related to compio-driver refactor Refactoring existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants