migrate to clap 3.x

Bug: 229854484
Test: atest
Change-Id: Iae1ad1b5f7c2832c11bf2db09e7985ddaaf927d4
diff --git a/apkdmverity/Android.bp b/apkdmverity/Android.bp
index d7aa921..06d4500 100644
--- a/apkdmverity/Android.bp
+++ b/apkdmverity/Android.bp
@@ -11,7 +11,7 @@
     rustlibs: [
         "libanyhow",
         "libbitflags",
-        "libclap_deprecated",
+        "libclap",
         "libdata_model",
         "libidsig",
         "libitertools",
diff --git a/apkdmverity/src/main.rs b/apkdmverity/src/main.rs
index 16dd480..de7f5bb 100644
--- a/apkdmverity/src/main.rs
+++ b/apkdmverity/src/main.rs
@@ -45,7 +45,7 @@
                             block device is created at \"/dev/mapper/<name>\".' root_hash is \
                             optional; idsig file's root hash will be used if specified as \"none\"."
             ))
-        .arg(Arg::with_name("verbose").short("v").long("verbose").help("Shows verbose output"))
+        .arg(Arg::with_name("verbose").short('v').long("verbose").help("Shows verbose output"))
         .get_matches();
 
     let apks = matches.values_of("apk").unwrap();
diff --git a/authfs/fd_server/Android.bp b/authfs/fd_server/Android.bp
index c4aa1d8..9499cd2 100644
--- a/authfs/fd_server/Android.bp
+++ b/authfs/fd_server/Android.bp
@@ -13,7 +13,7 @@
         "libbinder_common",
         "libbinder_rpc_unstable_bindgen",
         "libbinder_rs",
-        "libclap_deprecated",
+        "libclap",
         "liblibc",
         "liblog_rust",
         "libnix",
diff --git a/authfs/tests/Android.bp b/authfs/tests/Android.bp
index a886d10..ebc6dd4 100644
--- a/authfs/tests/Android.bp
+++ b/authfs/tests/Android.bp
@@ -31,7 +31,7 @@
     rustlibs: [
         "libandroid_logger",
         "libanyhow",
-        "libclap_deprecated",
+        "libclap",
         "libcommand_fds",
         "liblog_rust",
         "libnix",
diff --git a/avmd/Android.bp b/avmd/Android.bp
index e31e103..9f0b28b 100644
--- a/avmd/Android.bp
+++ b/avmd/Android.bp
@@ -30,7 +30,7 @@
         "libapexutil_rust",
         "libapkverify",
         "libavmd",
-        "libclap_deprecated",
+        "libclap",
         "libserde",
         "libserde_cbor",
         "libvbmeta_rust",
diff --git a/avmd/src/main.rs b/avmd/src/main.rs
index b156a66..ca28f42 100644
--- a/avmd/src/main.rs
+++ b/avmd/src/main.rs
@@ -149,8 +149,8 @@
 
     let args = app.get_matches();
     match args.subcommand() {
-        ("create", Some(sub_args)) => create(sub_args)?,
-        ("dump", Some(sub_args)) => dump(sub_args)?,
+        Some(("create", sub_args)) => create(sub_args)?,
+        Some(("dump", sub_args)) => dump(sub_args)?,
         _ => bail!("Invalid arguments"),
     }
     Ok(())
diff --git a/compos/Android.bp b/compos/Android.bp
index 7ef9e75..69b22d6 100644
--- a/compos/Android.bp
+++ b/compos/Android.bp
@@ -14,7 +14,7 @@
         "libbinder_common",
         "libbinder_rpc_unstable_bindgen",
         "libbinder_rs",
-        "libclap_deprecated",
+        "libclap",
         "libcompos_common",
         "liblibc",
         "liblog_rust",
diff --git a/compos/composd_cmd/Android.bp b/compos/composd_cmd/Android.bp
index 1ede0ba..c230e13 100644
--- a/compos/composd_cmd/Android.bp
+++ b/compos/composd_cmd/Android.bp
@@ -10,7 +10,7 @@
         "android.system.composd-rust",
         "libanyhow",
         "libbinder_rs",
-        "libclap_deprecated",
+        "libclap",
         "libcompos_common",
     ],
     prefer_rlib: true,
diff --git a/compos/composd_cmd/composd_cmd.rs b/compos/composd_cmd/composd_cmd.rs
index c6a5479..d5feed8 100644
--- a/compos/composd_cmd/composd_cmd.rs
+++ b/compos/composd_cmd/composd_cmd.rs
@@ -49,8 +49,8 @@
     ProcessState::start_thread_pool();
 
     match args.subcommand() {
-        ("staged-apex-compile", _) => run_staged_apex_compile()?,
-        ("test-compile", Some(sub_matches)) => {
+        Some(("staged-apex-compile", _)) => run_staged_apex_compile()?,
+        Some(("test-compile", sub_matches)) => {
             let prefer_staged = sub_matches.is_present("prefer-staged");
             run_test_compile(prefer_staged)?;
         }
diff --git a/compos/verify/Android.bp b/compos/verify/Android.bp
index 38edf1c..5c74e4f 100644
--- a/compos/verify/Android.bp
+++ b/compos/verify/Android.bp
@@ -11,7 +11,7 @@
         "libandroid_logger",
         "libanyhow",
         "libbinder_rs",
-        "libclap_deprecated",
+        "libclap",
         "libcompos_common",
         "libcompos_verify_native_rust",
         "liblog_rust",
diff --git a/zipfuse/Android.bp b/zipfuse/Android.bp
index d07a8e1..e10fc31 100644
--- a/zipfuse/Android.bp
+++ b/zipfuse/Android.bp
@@ -10,7 +10,7 @@
     prefer_rlib: true,
     rustlibs: [
         "libanyhow",
-        "libclap_deprecated",
+        "libclap",
         "libfuse_rust",
         "liblibc",
         "libzip",
diff --git a/zipfuse/src/main.rs b/zipfuse/src/main.rs
index 874056a..8400a72 100644
--- a/zipfuse/src/main.rs
+++ b/zipfuse/src/main.rs
@@ -41,7 +41,7 @@
     let matches = App::new("zipfuse")
         .arg(
             Arg::with_name("options")
-                .short("o")
+                .short('o')
                 .takes_value(true)
                 .required(false)
                 .help("Comma separated list of mount options"),