Skip to content

refactor(h2): refactor legacy unsafe wrapper code - #905

Merged
0x676e67 merged 2 commits into
mainfrom
refactor
Aug 17, 2025
Merged

refactor(h2): refactor legacy unsafe wrapper code#905
0x676e67 merged 2 commits into
mainfrom
refactor

Conversation

@0x676e67

Copy link
Copy Markdown
Owner

No description provided.

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 legacy unsafe wrapper code in the HTTP/2 implementation by removing unsafe memory transmutation patterns and simplifying the type system. The changes eliminate the UpgradedSendStream wrapper and its associated unsafe Neutered type, replacing them with direct usage of the underlying SendStream type.

  • Removes unsafe memory transmutation code in UpgradedSendStream and Neutered types
  • Updates function calls to use send_data instead of the wrapper's write method
  • Adds Send trait bounds to ensure type safety without unsafe code

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/lib.rs Adds commented deny directive for unsafe code
src/core/client/proto/h2/mod.rs Removes unsafe wrapper types and updates method calls
src/core/client/proto/h2/client.rs Updates type usage and adds Send trait bounds
src/core/client/dispatch.rs Adds Send trait bound for body data

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/core/client/proto/h2/mod.rs
Comment thread src/core/client/proto/h2/mod.rs
Comment thread src/core/client/proto/h2/mod.rs
@0x676e67
0x676e67 marked this pull request as ready for review August 17, 2025 07:12
@0x676e67
0x676e67 merged commit 172f1c5 into main Aug 17, 2025
17 checks passed
@0x676e67
0x676e67 deleted the refactor branch August 17, 2025 07:14
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.

2 participants