Tidying
This commit is contained in:
parent
108cffcba0
commit
9b5f2e465b
@ -403,27 +403,17 @@ impl<T, const N: usize> ChannelState<T, N> {
|
|||||||
const INIT: MaybeUninit<UnsafeCell<T>> = MaybeUninit::uninit();
|
const INIT: MaybeUninit<UnsafeCell<T>> = MaybeUninit::uninit();
|
||||||
|
|
||||||
const fn new() -> Self {
|
const fn new() -> Self {
|
||||||
let buf = [Self::INIT; N];
|
|
||||||
let read_pos = 0;
|
|
||||||
let write_pos = 0;
|
|
||||||
let full = false;
|
|
||||||
let closing = false;
|
|
||||||
let closed = false;
|
|
||||||
let receiver_registered = false;
|
|
||||||
let senders_registered = 0;
|
|
||||||
let receiver_waker = WakerRegistration::new();
|
|
||||||
let senders_waker = WakerRegistration::new();
|
|
||||||
ChannelState {
|
ChannelState {
|
||||||
buf,
|
buf: [Self::INIT; N],
|
||||||
read_pos,
|
read_pos: 0,
|
||||||
write_pos,
|
write_pos: 0,
|
||||||
full,
|
full: false,
|
||||||
closing,
|
closing: false,
|
||||||
closed,
|
closed: false,
|
||||||
receiver_registered,
|
receiver_registered: false,
|
||||||
senders_registered,
|
senders_registered: 0,
|
||||||
receiver_waker,
|
receiver_waker: WakerRegistration::new(),
|
||||||
senders_waker,
|
senders_waker: WakerRegistration::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user