Skip to content

Commit 2db19f2

Browse files
committed
Don't pass Arc<Config> to runtest::run
This function doesn't need its own clone of the `Arc`, and can just take a reference instead.
1 parent f435972 commit 2db19f2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/tools/compiletest/src/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl RunnableTest {
224224
fn run(&self, stdout: &dyn ConsoleOut, stderr: &dyn ConsoleOut) {
225225
__rust_begin_short_backtrace(|| {
226226
crate::runtest::run(
227-
Arc::clone(&self.config),
227+
&self.config,
228228
stdout,
229229
stderr,
230230
&self.testpaths,

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::hash::{DefaultHasher, Hash, Hasher};
66
use std::io::prelude::*;
77
use std::io::{self, BufReader};
88
use std::process::{Child, Command, ExitStatus, Output, Stdio};
9-
use std::sync::Arc;
109
use std::{env, fmt, iter, str};
1110

1211
use build_helper::fs::remove_and_create_dir_all;
@@ -110,7 +109,7 @@ fn dylib_name(name: &str) -> String {
110109
}
111110

112111
pub fn run(
113-
config: Arc<Config>,
112+
config: &Config,
114113
stdout: &dyn ConsoleOut,
115114
stderr: &dyn ConsoleOut,
116115
testpaths: &TestPaths,

0 commit comments

Comments
 (0)