We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
repr(transparent)
hyper_context
1 parent 187b8f2 commit 89558f1Copy full SHA for 89558f1
src/ffi/task.rs
@@ -66,7 +66,6 @@ struct TaskFuture {
66
}
67
68
/// An async context for a task that contains the related waker.
69
-#[repr(transparent)]
70
pub struct hyper_context<'a>(Context<'a>);
71
72
/// A waker that is saved and used to waken a pending task.
@@ -379,7 +378,7 @@ where
379
378
380
impl hyper_context<'_> {
381
pub(crate) fn wrap<'a, 'b>(cx: &'a mut Context<'b>) -> &'a mut hyper_context<'b> {
382
- // 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.
383
unsafe { std::mem::transmute::<&mut Context<'_>, &mut hyper_context<'_>>(cx) }
384
385
0 commit comments