]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/test.rs
Various minor/cosmetic improvements to code
[rust.git] / src / libsyntax / test.rs
index 9f554a90afbc4d7bcf5b87b38febcbdf77f35505..436a167e6a06356ecb2757dffe9a09e6ff8eee35 100644 (file)
@@ -281,7 +281,7 @@ fn generate_test_harness(sess: &ParseSess,
         path: Vec::new(),
         test_cases: Vec::new(),
         reexport_test_harness_main,
-        // NB: doesn't consider the value of `--crate-name` passed on the command line.
+        // N.B., doesn't consider the value of `--crate-name` passed on the command line.
         is_libtest: attr::find_crate_name(&krate.attrs).map(|s| s == "test").unwrap_or(false),
         toplevel_reexport: None,
         ctxt: SyntaxContext::empty().apply_mark(mark),
@@ -346,7 +346,7 @@ fn mk_main(cx: &mut TestCtxt) -> P<ast::Item> {
 
     test_runner.span = sp;
 
-    let test_main_path_expr = ecx.expr_path(test_runner.clone());
+    let test_main_path_expr = ecx.expr_path(test_runner);
     let call_test_main = ecx.expr_call(sp, test_main_path_expr,
                                        vec![mk_tests_slice(cx)]);
     let call_test_main = ecx.stmt_expr(call_test_main);