Skip to content

Commit fdd6750

Browse files
committed
compiletest: Remove uses of Cell.
1 parent f08f3a7 commit fdd6750

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/compiletest/compiletest.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,19 +325,17 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
325325
}
326326

327327
pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {
328-
use std::cell::Cell;
329-
let config = Cell::new((*config).clone());
328+
let config = (*config).clone();
330329
// FIXME (#9639): This needs to handle non-utf8 paths
331-
let testfile = Cell::new(testfile.as_str().unwrap().to_owned());
332-
test::DynTestFn(proc() { runtest::run(config.take(), testfile.take()) })
330+
let testfile = testfile.as_str().unwrap().to_owned();
331+
test::DynTestFn(proc() { runtest::run(config, testfile) })
333332
}
334333

335334
pub fn make_metrics_test_closure(config: &config, testfile: &Path) -> test::TestFn {
336-
use std::cell::Cell;
337-
let config = Cell::new((*config).clone());
335+
let config = (*config).clone();
338336
// FIXME (#9639): This needs to handle non-utf8 paths
339-
let testfile = Cell::new(testfile.as_str().unwrap().to_owned());
337+
let testfile = testfile.as_str().unwrap().to_owned();
340338
test::DynMetricFn(proc(mm) {
341-
runtest::run_metrics(config.take(), testfile.take(), mm)
339+
runtest::run_metrics(config, testfile, mm)
342340
})
343341
}

0 commit comments

Comments
 (0)