Browse Source

Merge pull request #24 from rust3ds/fix/clippy-build-std

Move build-std argument after the subcommand to fix clippy
pull/30/head
Meziu 2 years ago committed by GitHub
parent
commit
7b70b6b26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/lib.rs

14
src/lib.rs

@ -113,11 +113,6 @@ pub fn make_cargo_build_command(
let sysroot = find_sysroot(); let sysroot = find_sysroot();
let mut command = Command::new(cargo); let mut command = Command::new(cargo);
if !sysroot.join("lib/rustlib/armv6k-nintendo-3ds").exists() {
eprintln!("No pre-build std found, using build-std");
command.arg("-Z").arg("build-std");
}
let cmd = match cmd { let cmd = match cmd {
CargoCommand::Build | CargoCommand::Run => "build", CargoCommand::Build | CargoCommand::Run => "build",
CargoCommand::Test => "test", CargoCommand::Test => "test",
@ -131,7 +126,14 @@ pub fn make_cargo_build_command(
.arg("--target") .arg("--target")
.arg("armv6k-nintendo-3ds") .arg("armv6k-nintendo-3ds")
.arg("--message-format") .arg("--message-format")
.arg(message_format) .arg(message_format);
if !sysroot.join("lib/rustlib/armv6k-nintendo-3ds").exists() {
eprintln!("No pre-build std found, using build-std");
command.arg("-Z").arg("build-std");
}
command
.args(args) .args(args)
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.stdin(Stdio::inherit()) .stdin(Stdio::inherit())

Loading…
Cancel
Save