Browse Source

Move build-std argument after the subcommand to fix clippy

This fixes `cargo +nightly 3ds clippy`. See this thread:
https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/-Zbuild-std.20and.20clippy.3F/near/290622458
pull/24/head
Mark Drobnak 2 years ago
parent
commit
7e99e1a9a5
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3
  1. 10
      src/lib.rs

10
src/lib.rs

@ -113,11 +113,6 @@ pub fn make_cargo_build_command( @@ -113,11 +113,6 @@ pub fn make_cargo_build_command(
let sysroot = find_sysroot();
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 {
CargoCommand::Build | CargoCommand::Run => "build",
CargoCommand::Test => "test",
@ -137,6 +132,11 @@ pub fn make_cargo_build_command( @@ -137,6 +132,11 @@ pub fn make_cargo_build_command(
.stdin(Stdio::inherit())
.stderr(Stdio::inherit());
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
}

Loading…
Cancel
Save