TIL https://doc.rust-lang.org/std/primitive.usize.html#method.overflowing_sub … is a thing, and it's exactly what I needed to allow doing stuff like `foo(index - 1)` and preventing integer bounds check problems :D
-
Show this thread
Not the prettiest code, but I'll be damned if this isn't efficient :D https://github.com/datrs/hypercore/commit/10972be3af0925f4cd7e4e198226ef18fcb8e352 …
4:09 AM - 28 Jun 2018
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.