4 ms·
len(arr) == 255 should be okay, 0..255 doesn't include the end index[0]. In the Rust playground[1] I see it only print up to 254. [0] https://doc.rust-lang.or
by CBLT 6y ago
len(arr) == 255 should be okay, 0..255 doesn't include the end index[0]. In the Rust playground[1] I see it only print up to 254.
[0] https://doc.rust-lang.org/stable/rust-by-example/flow_control/for.html https://doc.rust-lang.org/stable/rust-by-example/flow_contro...
[1] https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4e7af2cc15e50306d846946684ccc9be https://play.rust-lang.org/?version=stable&mode=debug&editio...