fast solutions to all Codewars katas written in Rust
it's not enough to solve a problem, it needs to be solved well
-
nontrivial katas have benchmarks to easily compare solutions
-
usage of third-party libraries is allowed even if not accepted by Codewars
-
solutions are safe, meaning that they will panic or return nonsense on nonsense input rather than causing undefined behavior; nevertheless, there are 102
unsafe
blocks -
even though most tests on Codewars contain only ASCII input, they use Rust's standard UTF-8–encoded strings, so solutions for string katas are made for Unicode input; nevertheless,
.bytes()
|.as_bytes()
|.as_mut_vec()
are used 77 times -
proposed function signatures and names are preserved; but are clippy-adjusted
-
(large) lookup tables aren't generally allowed