mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
16 lines
383 B
Rust
16 lines
383 B
Rust
//@run-rustfix
|
|
#![warn(clippy::repeat_once)]
|
|
#[allow(unused, clippy::redundant_clone)]
|
|
fn main() {
|
|
const N: usize = 1;
|
|
let s = "str";
|
|
let string = "String".to_string();
|
|
let slice = [1; 5];
|
|
|
|
let a = [1; 5].to_vec();
|
|
let b = slice.to_vec();
|
|
let c = "hello".to_string();
|
|
let d = "hi".to_string();
|
|
let e = s.to_string();
|
|
let f = string.clone();
|
|
}
|