Skip to content

Commit

Permalink
Optimize code to remove warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScSofts committed May 12, 2023
1 parent 9a9ecc2 commit 8330985
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::env;
use std::env::args;
use std::process::exit;

mod cargo;
Expand Down Expand Up @@ -33,12 +32,6 @@ fn args_hack(cmd: &str) -> anyhow::Result<()> {
fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();

// for version check.
if let Some(_) = args().find(|x| x == "--cargo-ndk-version"){
print!("{}", env!("CARGO_PKG_VERSION"));
exit(0);
}

if env::var("CARGO").is_err() {
eprintln!("This binary may only be called via `cargo ndk`.");
exit(1);
Expand Down

0 comments on commit 8330985

Please sign in to comment.