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.
This commit is contained in:
kennytm 2018-09-20 21:36:32 +08:00
commit f5b8c7fa16
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

View File

@ -775,7 +775,7 @@ fn main() {
assert_eq!(2+2, 4);
}".to_string();
let output = make_test(input, None, false, &opts);
assert_eq!(output, (expected.clone(), 2));
assert_eq!(output, (expected, 2));
}
#[test]
@ -973,7 +973,7 @@ fn main() {
assert_eq!(2+2, 4);
}".to_string();
let output = make_test(input, None, false, &opts);
assert_eq!(output, (expected.clone(), 2));
assert_eq!(output, (expected, 2));
}
#[test]
@ -988,7 +988,7 @@ assert_eq!(2+2, 4);";
//Ceci n'est pas une `fn main`
assert_eq!(2+2, 4);".to_string();
let output = make_test(input, None, true, &opts);
assert_eq!(output, (expected.clone(), 1));
assert_eq!(output, (expected, 1));
}
#[test]
@ -1003,6 +1003,6 @@ assert_eq!(2+2, 4);".to_string();
assert_eq!(2+2, 4);
}".to_string();
let output = make_test(input, None, false, &opts);
assert_eq!(output, (expected.clone(), 1));
assert_eq!(output, (expected, 1));
}
}