fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#![warn(clippy::repeat_once)] 2#[allow(unused, clippy::redundant_clone)] 3fn main() { 4 const N: usize = 1; 5 let s = "str"; 6 let string = "String".to_string(); 7 let slice = [1; 5]; 8 9 let a = [1; 5].to_vec(); 10 let b = slice.to_vec(); 11 let c = "hello".to_string(); 12 let d = "hi".to_string(); 13 let e = s.to_string(); 14 let f = string.clone(); 15}