Re:Await in Rust
by jcranmer on Monday August 12, 2019 @11:56AM
(#20676593)
I assume that what the OP meant by Duff's Device is "switch in C is syntactically a goto" rather than the specific loop-unrolling paradigm of Duff's Device itself. An example usage I've come across is the bzip2 decompressor:
https://github.com/enthought/bzip2-1.0.6/blob/288acf97a15d55...
(note that the case statements are hidden in all of the GET_* macro calls).
(note that the case statements are hidden in all of the GET_* macro calls).