Skip to content

Commit 1bddd63

Browse files
committed
6
1 parent 944e53a commit 1bddd63

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

xtask/src/runchecks.rs

+12-14
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ fn rustup(args: &[&str]) {
5959
endgroup!();
6060
}
6161

62+
fn add_nightly() {
63+
rustup(&[
64+
"component",
65+
"add",
66+
"rust-src",
67+
"--toolchain",
68+
"nightly-2023-07-01",
69+
])
70+
}
71+
6272
// Define and run a cargo command
6373
fn run_cargo(command: &str, params: Params, error: &str) {
6474
run_cargo_with_path::<String>(command, params, None, error)
@@ -79,13 +89,7 @@ fn run_cargo_with_path<P: AsRef<Path>>(
7989
.unwrap()
8090
.ends_with("examples/train-web/train")
8191
{
82-
rustup(&[
83-
"component",
84-
"add",
85-
"rust-src",
86-
"--toolchain",
87-
"nightly-2023-07-01",
88-
]);
92+
add_nightly();
8993
vec!["+nightly-2023-07-01"]
9094
} else {
9195
vec![]
@@ -426,13 +430,7 @@ fn check_typos() {
426430
}
427431

428432
fn check_examples() {
429-
rustup(&[
430-
"component",
431-
"add",
432-
"rust-src",
433-
"--toolchain",
434-
"nightly-2023-07-01",
435-
]);
433+
add_nightly();
436434
let workspaces = get_workspaces(WorkspaceMemberType::Example);
437435
for workspace in workspaces {
438436
if workspace.name == "notebook" {

0 commit comments

Comments
 (0)