Skip to content

Commit a2fb380

Browse files
committed
fix clippy::clone_double_ref in tests
1 parent 377d4ba commit a2fb380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn unique() {
123123
#[test]
124124
fn intersperse() {
125125
let xs = ["a", "", "b", "c"];
126-
let v: Vec<&str> = xs.iter().map(|x| x.clone()).intersperse(", ").collect();
126+
let v: Vec<&str> = xs.iter().cloned().intersperse(", ").collect();
127127
let text: String = v.concat();
128128
assert_eq!(text, "a, , b, c".to_string());
129129

0 commit comments

Comments
 (0)