]> git.lizzy.rs Git - rust.git/commitdiff
Remove unneeded clone() from tests
authorErich Cordoba <erich.cm@yandex.com>
Tue, 18 Sep 2018 23:32:29 +0000 (18:32 -0500)
committerErich Cordoba <erich.cm@yandex.com>
Tue, 18 Sep 2018 23:32:29 +0000 (18:32 -0500)
The expected.clone() calls were not needed for the tests. This is
just to keep consistency between the test cases.

src/librustdoc/test.rs

index 3b07a2ccdde09379e8e10fd706d8db6b733f80ca..8a9ca924ee1ab997e06c3f74c55890c3a7553ec5 100644 (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 @@ fn make_test_dont_insert_main() {
 //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 @@ fn make_test_display_warnings() {
 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));
     }
 }