]> git.lizzy.rs Git - rust.git/commit
Use indexing instead of .get_unchecked() for LUT lookup
authorMartin Gammelsæter <martin@mg.am>
Wed, 9 Mar 2022 21:21:35 +0000 (22:21 +0100)
committerMartin Gammelsæter <martin@mg.am>
Wed, 9 Mar 2022 21:21:35 +0000 (22:21 +0100)
commit7f4f4fc34c5f404042e200c26ffb0395278d2cea
tree83e9afcf3d9683e2647ce52a267b0ae38e8488d9
parent876142417cd03ee0838d2fc83ddac83c06748ca6
Use indexing instead of .get_unchecked() for LUT lookup

Based on @paolobarbolini's tip that the unsafe block was unnecessary in
this case.

Not much left of `hexify()` after this, so seemed clearer to just inline
it.
library/core/src/ascii.rs