byte_array1.iter().position(|&x| x == digit)
Not by what it does. But by the fact that apparently every operation uses it, but most just throw away the result.