fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#![allow(clippy::unnecessary_operation)] 2#![warn(clippy::bytes_nth)] 3 4fn main() { 5 let s = String::from("String"); 6 let _ = s.as_bytes().get(3).copied(); 7 let _ = &s.as_bytes()[3]; 8 let _ = s[..].as_bytes().get(3).copied(); 9}