Skip to content

Commit 13e5e3a

Browse files
committed
Fix build
1 parent a691d79 commit 13e5e3a

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/cargo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ fn clang_lib_path(ndk_home: &Path) -> PathBuf {
8686
.join("linux")
8787
}
8888

89-
const CARGO_NDK_SYSROOT_PATH_KEY: &'static str = "CARGO_NDK_SYSROOT_PATH";
90-
const CARGO_NDK_SYSROOT_TARGET_KEY: &'static str = "CARGO_NDK_SYSROOT_TARGET";
91-
const CARGO_NDK_SYSROOT_LIBS_PATH_KEY: &'static str = "CARGO_NDK_SYSROOT_LIBS_PATH";
89+
const CARGO_NDK_SYSROOT_PATH_KEY: &str = "CARGO_NDK_SYSROOT_PATH";
90+
const CARGO_NDK_SYSROOT_TARGET_KEY: &str = "CARGO_NDK_SYSROOT_TARGET";
91+
const CARGO_NDK_SYSROOT_LIBS_PATH_KEY: &str = "CARGO_NDK_SYSROOT_LIBS_PATH";
9292

9393
pub(crate) fn build_env(
9494
triple: &str,

src/cli/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct EnvArgs {
3232
}
3333

3434
pub fn run(args: Vec<String>) -> anyhow::Result<()> {
35-
let (mut shell, args) = init::<EnvArgs>(args)?;
35+
let (mut shell, args) = init(args)?;
3636
let args = EnvArgs::try_parse_from(args)?;
3737

3838
let (ndk_home, _ndk_detection_method) = match derive_ndk_path(&mut shell) {

src/cli/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl StringVecExt for Vec<String> {
370370
}
371371
}
372372

373-
pub(self) fn init<T: Parser + Clone>(args: Vec<String>) -> anyhow::Result<(Shell, Vec<String>)> {
373+
fn init(args: Vec<String>) -> anyhow::Result<(Shell, Vec<String>)> {
374374
if std::env::var_os("CARGO_NDK_NO_PANIC_HOOK").is_none() {
375375
std::panic::set_hook(Box::new(panic_hook));
376376
}
@@ -429,7 +429,7 @@ pub(self) fn init<T: Parser + Clone>(args: Vec<String>) -> anyhow::Result<(Shell
429429

430430
pub fn run(args: Vec<String>) -> anyhow::Result<()> {
431431
// Check for help/version before parsing to avoid required arg errors
432-
let (mut shell, args) = init::<BuildArgs>(args)?;
432+
let (mut shell, args) = init(args)?;
433433

434434
let args = match parse_mixed_args::<BuildArgs>(args) {
435435
Ok(args) => args,

src/cli/runner.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
7979
})?;
8080

8181
let push_status = Command::new(&adb_path)
82-
.with_serial(adb_serial.as_deref())
82+
.with_serial(adb_serial)
8383
.arg("push")
8484
.arg(&args.executable)
8585
.arg(&device_path)
@@ -97,7 +97,7 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
9797

9898
// Make binary executable
9999
let chmod_status = Command::new(&adb_path)
100-
.with_serial(adb_serial.as_deref())
100+
.with_serial(adb_serial)
101101
.arg("shell")
102102
.arg("chmod")
103103
.arg("755")
@@ -117,7 +117,7 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
117117
};
118118

119119
let run_status = Command::new(&adb_path)
120-
.with_serial(adb_serial.as_deref())
120+
.with_serial(adb_serial)
121121
.arg("shell")
122122
.arg(&device_path)
123123
.arg(verbosity_arg)
@@ -126,7 +126,7 @@ pub fn run(args: Vec<String>) -> anyhow::Result<()> {
126126

127127
// Clean up the binary from device
128128
let _ = Command::new(&adb_path)
129-
.with_serial(adb_serial.as_deref())
129+
.with_serial(adb_serial)
130130
.arg("shell")
131131
.arg("rm")
132132
.arg(&device_path)

src/cli/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl HasCargoArgs for TestArgs {
5151
pub fn run(args: Vec<String>) -> anyhow::Result<()> {
5252
// Check for help/version before parsing to avoid required arg errors
5353
let valid_args = args.split(|x| x == "--").next().unwrap_or(&args).to_vec();
54-
let (mut shell, _) = init::<TestArgs>(valid_args)?;
54+
let (mut shell, _) = init(valid_args)?;
5555

5656
let mut args = match TestArgs::try_parse_from(&args) {
5757
Ok(args) => args,

0 commit comments

Comments
 (0)