polyfractal/bounded-spsc-queue

Compile-time error for zero-sized types or better error message

spearman opened this issue · 2 comments

Currently it seems to crash at runtime with no error message when trying to create a channel of zero-sized types (such as unit ()).

Ah, yeah, probably something around here, when it tries to mem::size_of::<T> the zero-sized type.

I'm really slogged with work but will try to look into this soon. If you want to PR that'd be great too!

Created an assertion with a message. As mentioned in the commit, a compile-time error might be possible once CTFE is implemented.

BTW, what did you use to create the performance graphs? Is it a Rust tool?