Skip to content

Commit f8829a3

Browse files
committed
Move run to global
1 parent 41125b0 commit f8829a3

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

openblas-src/build.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ use std::{env, path::*, process::Command};
22

33
const OPENBLAS_VERSION: &str = "0.3.21";
44

5+
#[allow(unused)]
6+
fn run(command: &mut Command) {
7+
println!("Running: `{:?}`", command);
8+
match command.status() {
9+
Ok(status) => {
10+
if !status.success() {
11+
panic!("Failed: `{:?}` ({})", command, status);
12+
}
13+
}
14+
Err(error) => {
15+
panic!("Failed: `{:?}` ({})", command, error);
16+
}
17+
}
18+
}
19+
520
fn feature_enabled(feature: &str) -> bool {
621
env::var(format!("CARGO_FEATURE_{}", feature.to_uppercase())).is_ok()
722
}
@@ -268,20 +283,6 @@ fn build() {
268283
output.join("opt/OpenBLAS/lib").display(),
269284
);
270285

271-
fn run(command: &mut Command) {
272-
println!("Running: `{:?}`", command);
273-
match command.status() {
274-
Ok(status) => {
275-
if !status.success() {
276-
panic!("Failed: `{:?}` ({})", command, status);
277-
}
278-
}
279-
Err(error) => {
280-
panic!("Failed: `{:?}` ({})", command, error);
281-
}
282-
}
283-
}
284-
285286
fn binary() -> &'static str {
286287
if cfg!(target_pointer_width = "32") {
287288
"32"

0 commit comments

Comments
 (0)