Skip to content

Commit f5b8c7f

Browse files
committed
Rollup merge of #54337 - ericho:remove_clone_tests, r=Mark-Simulacrum
Remove unneeded clone() from tests in librustdoc The expected.clone() calls were not needed for the tests. This is just to keep consistency between the test cases.
2 parents 3bfa947 + 3d66263 commit f5b8c7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ fn main() {
775775
assert_eq!(2+2, 4);
776776
}".to_string();
777777
let output = make_test(input, None, false, &opts);
778-
assert_eq!(output, (expected.clone(), 2));
778+
assert_eq!(output, (expected, 2));
779779
}
780780

781781
#[test]
@@ -973,7 +973,7 @@ fn main() {
973973
assert_eq!(2+2, 4);
974974
}".to_string();
975975
let output = make_test(input, None, false, &opts);
976-
assert_eq!(output, (expected.clone(), 2));
976+
assert_eq!(output, (expected, 2));
977977
}
978978

979979
#[test]
@@ -988,7 +988,7 @@ assert_eq!(2+2, 4);";
988988
//Ceci n'est pas une `fn main`
989989
assert_eq!(2+2, 4);".to_string();
990990
let output = make_test(input, None, true, &opts);
991-
assert_eq!(output, (expected.clone(), 1));
991+
assert_eq!(output, (expected, 1));
992992
}
993993

994994
#[test]
@@ -1003,6 +1003,6 @@ assert_eq!(2+2, 4);".to_string();
10031003
assert_eq!(2+2, 4);
10041004
}".to_string();
10051005
let output = make_test(input, None, false, &opts);
1006-
assert_eq!(output, (expected.clone(), 1));
1006+
assert_eq!(output, (expected, 1));
10071007
}
10081008
}

0 commit comments

Comments
 (0)