Skip to content

Commit

Permalink
Rollup merge of rust-lang#54337 - ericho:remove_clone_tests, r=Mark-S…
Browse files Browse the repository at this point in the history
…imulacrum

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.
  • Loading branch information
kennytm committed Sep 20, 2018
2 parents 3bfa947 + 3d66263 commit f5b8c7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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));
}
}

0 comments on commit f5b8c7f

Please sign in to comment.