Skip to content

Commit

Permalink
make senders and receivers struct repr(C)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmao authored Oct 28, 2023
1 parent 2dc6a1e commit 9269095
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ let sync_sender=sender.clone_async();
```
"##
)]
#[repr(C)]
pub struct Sender<T> {
internal: Internal<T>,
}
Expand All @@ -58,6 +59,7 @@ pub struct Sender<T> {
/// let sync_sender=sender.clone_sync();
/// ```
#[cfg(feature = "async")]
#[repr(C)]
pub struct AsyncSender<T> {
internal: Internal<T>,
}
Expand Down Expand Up @@ -1013,7 +1015,7 @@ let async_receiver=receiver.clone_async();
```
"##
)]

#[repr(C)]
pub struct Receiver<T> {
internal: Internal<T>,
}
Expand All @@ -1035,6 +1037,7 @@ impl<T> fmt::Debug for Receiver<T> {
/// let sync_receiver=receiver.clone_sync();
/// ```
#[cfg(feature = "async")]
#[repr(C)]
pub struct AsyncReceiver<T> {
internal: Internal<T>,
}
Expand Down

0 comments on commit 9269095

Please sign in to comment.