]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/repeat_once.fixed
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
[rust.git] / src / tools / clippy / tests / ui / repeat_once.fixed
1 // run-rustfix
2 #![warn(clippy::repeat_once)]
3 #[allow(unused, clippy::redundant_clone)]
4 fn main() {
5     const N: usize = 1;
6     let s = "str";
7     let string = "String".to_string();
8     let slice = [1; 5];
9
10     let a = [1; 5].to_vec();
11     let b = slice.to_vec();
12     let c = "hello".to_string();
13     let d = "hi".to_string();
14     let e = s.to_string();
15     let f = string.clone();
16 }