ringbuf icon indicating copy to clipboard operation
ringbuf copied to clipboard

const initializer for `LocalRb<T, [MaybeUninit<T>, N]>`

Open anatawa12 opened this issue 1 year ago • 1 comments

I want to use Mutex<LocalRb<T, [MaybeUninit<T>, N]>> with static variable but there is no initializer method for LocalRb<T, [MaybeUninit<T>, N]>. Could you provide something like LocalRb<T, [MaybeUninit<T>, N]>::new_const()?

PS: I found another crate that supports this

anatawa12 avatar Mar 01 '24 06:03 anatawa12

Thanks for feature request! I've added const fn constructor for RBs with Array storage (LocalRb, SharedRb)

agerasev avatar Mar 03 '24 04:03 agerasev