mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
5307cb5614
fix #3028.
16 lines
413 B
Rust
16 lines
413 B
Rust
// run-rustfix
|
|
#![warn(clippy::repeat_once)]
|
|
#[allow(unused, clippy::many_single_char_names, 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].repeat(1);
|
|
let b = slice.repeat(1);
|
|
let c = "hello".repeat(N);
|
|
let d = "hi".repeat(1);
|
|
let e = s.repeat(1);
|
|
let f = string.repeat(1);
|
|
}
|