From fdd6750570cf1434264a601fd2b749d7fe01dee8 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 4 Dec 2013 16:29:01 -0800 Subject: [PATCH] compiletest: Remove uses of `Cell`. --- src/compiletest/compiletest.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 5e3c38d01eb8..0fb75b7c8e0c 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -325,19 +325,17 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName { } pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn { - use std::cell::Cell; - let config = Cell::new((*config).clone()); + let config = (*config).clone(); // FIXME (#9639): This needs to handle non-utf8 paths - let testfile = Cell::new(testfile.as_str().unwrap().to_owned()); - test::DynTestFn(proc() { runtest::run(config.take(), testfile.take()) }) + let testfile = testfile.as_str().unwrap().to_owned(); + test::DynTestFn(proc() { runtest::run(config, testfile) }) } pub fn make_metrics_test_closure(config: &config, testfile: &Path) -> test::TestFn { - use std::cell::Cell; - let config = Cell::new((*config).clone()); + let config = (*config).clone(); // FIXME (#9639): This needs to handle non-utf8 paths - let testfile = Cell::new(testfile.as_str().unwrap().to_owned()); + let testfile = testfile.as_str().unwrap().to_owned(); test::DynMetricFn(proc(mm) { - runtest::run_metrics(config.take(), testfile.take(), mm) + runtest::run_metrics(config, testfile, mm) }) }