diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2022-12-06 11:22:20 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-12-06 11:22:20 +0000 |
commit | 286523b2fcf822c983d6f2414ada738c9ff01f86 (patch) | |
tree | 43f6c00795e0343bb380f3ae51558f150916e716 | |
parent | f2befb4bd7ac39cc96bc8afaff3818871ff4a49f (diff) | |
parent | 0790ff9ee4b044afd9653736fa1de3b4e1753365 (diff) | |
download | argh_shared-286523b2fcf822c983d6f2414ada738c9ff01f86.tar.gz |
Upgrade argh_shared to 0.1.9 am: 0790ff9ee4main-16k-with-phones
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/argh_shared/+/2328194
Change-Id: I8ffcdbd1ee73c5cafdb313bb593a087e162f243b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | Cargo.toml | 8 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 12 | ||||
-rw-r--r-- | README.md | 13 |
6 files changed, 30 insertions, 11 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 116e262..171d4a2 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "f1f85d2d89cbe09314dc1b59e581b8a43531cf3e" + "sha1": "adc704cd29f710864b0fc1872bc86f857bebfdbf" }, "path_in_vcs": "argh_shared" }
\ No newline at end of file @@ -1,8 +1,6 @@ // This file is generated by cargo2android.py --config cargo2android.json. // Do not modify this file as changes will be overridden on upgrade. - - package { default_applicable_licenses: ["external_rust_crates_argh_shared_license"], } @@ -25,7 +23,7 @@ rust_library { host_supported: true, crate_name: "argh_shared", cargo_env_compat: true, - cargo_pkg_version: "0.1.7", + cargo_pkg_version: "0.1.9", srcs: ["src/lib.rs"], edition: "2018", apex_available: [ @@ -12,8 +12,12 @@ [package] edition = "2018" name = "argh_shared" -version = "0.1.7" -authors = ["Taylor Cramer <cramertj@google.com>", "Benjamin Brittain <bwb@google.com>", "Erick Tryzelaar <etryzelaar@google.com>"] +version = "0.1.9" +authors = [ + "Taylor Cramer <cramertj@google.com>", + "Benjamin Brittain <bwb@google.com>", + "Erick Tryzelaar <etryzelaar@google.com>", +] description = "Derive-based argument parsing optimized for code size" readme = "README.md" license = "BSD-3-Clause" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 1f7e694..ca85786 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "argh_shared" -version = "0.1.7" +version = "0.1.9" authors = ["Taylor Cramer <cramertj@google.com>", "Benjamin Brittain <bwb@google.com>", "Erick Tryzelaar <etryzelaar@google.com>"] edition = "2018" license = "BSD-3-Clause" @@ -1,3 +1,7 @@ +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update rust/crates/argh_shared +# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md + name: "argh_shared" description: "Derive-based argument parsing optimized for code size" third_party { @@ -7,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/argh_shared/argh_shared-0.1.7.crate" + value: "https://static.crates.io/crates/argh_shared/argh_shared-0.1.9.crate" } - version: "0.1.7" + version: "0.1.9" license_type: NOTICE last_upgrade_date { year: 2022 - month: 1 - day: 13 + month: 12 + day: 5 } } @@ -175,3 +175,16 @@ struct SubCommandTwo { ``` NOTE: This is not an officially supported Google product. + + +## How to debug the expanded derive macro for `argh` + +The `argh::FromArgs` derive macro can be debugged with the [cargo-expand](https://crates.io/crates/cargo-expand) crate. + +### Expand the derive macro in `examples/simple_example.rs` + +See [argh/examples/simple_example.rs](./argh/examples/simple_example.rs) for the example struct we wish to expand. + +First, install `cargo-expand` by running `cargo install cargo-expand`. Note this requires the nightly build of Rust. + +Once installed, run `cargo expand` with in the `argh` package and you can see the expanded code. |