This should answer both of your questions: indexing is not implemented for u8 type and you need to cast u8 to usize.(get_part(TABLE[left as usize], left) << 4) + get_part(TABLE[right as usize], right) 这篇关于为什么我不能使用 u8 作为 Rust 数组的索引值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-12 11:58