Skip to content

Commit

Permalink
Revert "fix(ffi): add repr(transparent) to hyper_context (#3191)"
Browse files Browse the repository at this point in the history
This reverts commit 187b8f2.
  • Loading branch information
seanmonstar committed Apr 3, 2023
1 parent 187b8f2 commit 24e9be2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ffi/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct TaskFuture {
}

/// An async context for a task that contains the related waker.
#[repr(transparent)]
pub struct hyper_context<'a>(Context<'a>);

/// A waker that is saved and used to waken a pending task.
Expand Down Expand Up @@ -379,7 +378,7 @@ where

impl hyper_context<'_> {
pub(crate) fn wrap<'a, 'b>(cx: &'a mut Context<'b>) -> &'a mut hyper_context<'b> {
// A repr(transparent) struct with only one field has the same layout as that field.
// A struct with only one field has the same layout as that field.
unsafe { std::mem::transmute::<&mut Context<'_>, &mut hyper_context<'_>>(cx) }
}
}
Expand Down

0 comments on commit 24e9be2

Please sign in to comment.