aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-01 10:59:42 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-01 10:59:42 +0000
commitca271acf841d1d02ed81f5205b059528da261a8f (patch)
treed31c3153b558a6ddadad13f01f21db12ca8382fd
parent265156e5d1f7c5c37b33e1a1a21e7330b621d569 (diff)
parent5f609279b208a0db6f4866966c0858aeb3bf7393 (diff)
downloadclap_lex-ca271acf841d1d02ed81f5205b059528da261a8f.tar.gz
Snap for 9550355 from 5f609279b208a0db6f4866966c0858aeb3bf7393 to sdk-releaseplatform-tools-34.0.1platform-tools-34.0.0platform-tools-33.0.4
Change-Id: I2cebf7d586f29d96e27507673127e51b00c9b245
-rw-r--r--.cargo_vcs_info.json6
-rw-r--r--Android.bp22
-rw-r--r--Cargo.toml5
-rw-r--r--Cargo.toml.orig4
l---------LICENSE2
-rw-r--r--METADATA19
-rw-r--r--MODULE_LICENSE_APACHE2 (renamed from MODULE_LICENSE_MIT)0
-rw-r--r--README.md8
-rw-r--r--TEST_MAPPING38
-rw-r--r--cargo2android.json6
-rw-r--r--src/lib.rs8
11 files changed, 81 insertions, 37 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
new file mode 100644
index 0000000..658595e
--- /dev/null
+++ b/.cargo_vcs_info.json
@@ -0,0 +1,6 @@
+{
+ "git": {
+ "sha1": "af64699912401443786d84fe040f5d93761300d1"
+ },
+ "path_in_vcs": "clap_lex"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 1c98b55..93024cf 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --tests.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
@@ -39,30 +39,12 @@ license {
],
}
-rust_test {
- name: "clap_lex_test_src_lib",
- host_supported: true,
- crate_name: "clap_lex",
- cargo_env_compat: true,
- cargo_pkg_version: "0.2.4",
- srcs: ["src/lib.rs"],
- test_suites: ["general-tests"],
- auto_gen_config: true,
- test_options: {
- unit_test: true,
- },
- edition: "2021",
- rustlibs: [
- "libos_str_bytes",
- ],
-}
-
rust_library {
name: "libclap_lex",
host_supported: true,
crate_name: "clap_lex",
cargo_env_compat: true,
- cargo_pkg_version: "0.2.4",
+ cargo_pkg_version: "0.3.0",
srcs: ["src/lib.rs"],
edition: "2021",
rustlibs: [
diff --git a/Cargo.toml b/Cargo.toml
index ef51210..d685925 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.56.1"
+rust-version = "1.60.0"
name = "clap_lex"
-version = "0.2.4"
+version = "0.3.0"
include = [
"build.rs",
"src/**/*",
@@ -24,6 +24,7 @@ include = [
"examples/**/*",
]
description = "Minimal, flexible command line parser"
+readme = "README.md"
keywords = [
"argument",
"cli",
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 9883033..e3cc855 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "clap_lex"
-version = "0.2.4"
+version = "0.3.0"
description = "Minimal, flexible command line parser"
repository = "https://github.com/clap-rs/clap/tree/master/clap_lex"
categories = ["command-line-interface"]
@@ -13,7 +13,7 @@ keywords = [
]
license = "MIT OR Apache-2.0"
edition = "2021"
-rust-version = "1.56.1" # MSRV
+rust-version = "1.60.0" # MSRV
include = [
"build.rs",
"src/**/*",
diff --git a/LICENSE b/LICENSE
index 7f9a88e..6b579aa 120000
--- a/LICENSE
+++ b/LICENSE
@@ -1 +1 @@
-LICENSE-MIT \ No newline at end of file
+LICENSE-APACHE \ No newline at end of file
diff --git a/METADATA b/METADATA
index 00604ea..c61ab36 100644
--- a/METADATA
+++ b/METADATA
@@ -1,13 +1,20 @@
name: "clap_lex"
-description:
- "Minimal, flexible command line parser."
-
+description: "Minimal, flexible command line parser"
third_party {
url {
+ type: HOMEPAGE
+ value: "https://crates.io/crates/clap_lex"
+ }
+ url {
type: ARCHIVE
- value:"https://crates.io/crates/clap_lex"
+ value: "https://static.crates.io/crates/clap_lex/clap_lex-0.3.0.crate"
}
- version: "0.2.4"
- last_upgrade_date { year: 2022 month: 6 day: 30 }
+ version: "0.3.0"
+ # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same.
license_type: NOTICE
+ last_upgrade_date {
+ year: 2022
+ month: 11
+ day: 30
+ }
}
diff --git a/MODULE_LICENSE_MIT b/MODULE_LICENSE_APACHE2
index e69de29..e69de29 100644
--- a/MODULE_LICENSE_MIT
+++ b/MODULE_LICENSE_APACHE2
diff --git a/README.md b/README.md
index 887b953..eebd4c5 100644
--- a/README.md
+++ b/README.md
@@ -5,15 +5,15 @@
[![Crates.io](https://img.shields.io/crates/v/clap_lex?style=flat-square)](https://crates.io/crates/clap_lex)
[![Crates.io](https://img.shields.io/crates/d/clap_lex?style=flat-square)](https://crates.io/crates/clap_lex)
-[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.2.4/LICENSE-APACHE)
-[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.2.4/LICENSE-MIT)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.3.0/LICENSE-APACHE)
+[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/clap-rs/clap/blob/clap_lex-v0.3.0/LICENSE-MIT)
Dual-licensed under [Apache 2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT).
1. [About](#about)
2. [API Reference](https://docs.rs/clap_lex)
3. [Questions & Discussions](https://github.com/clap-rs/clap/discussions)
-4. [CONTRIBUTING](https://github.com/clap-rs/clap/blob/clap_lex-v0.2.4/clap_lex/CONTRIBUTING.md)
-5. [Sponsors](https://github.com/clap-rs/clap/blob/clap_lex-v0.2.4/README.md#sponsors)
+4. [CONTRIBUTING](https://github.com/clap-rs/clap/blob/clap_lex-v0.3.0/clap_lex/CONTRIBUTING.md)
+5. [Sponsors](https://github.com/clap-rs/clap/blob/clap_lex-v0.3.0/README.md#sponsors)
## About
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..999bbcf
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,38 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+ "imports": [
+ {
+ "path": "external/rust/crates/libsqlite3-sys"
+ },
+ {
+ "path": "packages/modules/Virtualization/apkdmverity"
+ },
+ {
+ "path": "packages/modules/Virtualization/authfs"
+ },
+ {
+ "path": "packages/modules/Virtualization/avmd"
+ },
+ {
+ "path": "packages/modules/Virtualization/encryptedstore"
+ },
+ {
+ "path": "packages/modules/Virtualization/virtualizationmanager"
+ },
+ {
+ "path": "packages/modules/Virtualization/vm"
+ },
+ {
+ "path": "packages/modules/Virtualization/zipfuse"
+ },
+ {
+ "path": "system/security/diced"
+ },
+ {
+ "path": "system/security/keystore2"
+ },
+ {
+ "path": "system/security/keystore2/legacykeystore"
+ }
+ ]
+}
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..3ebdf72
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,6 @@
+{
+ "dependencies": true,
+ "device": true,
+ "run": true,
+ "tests": true
+}
diff --git a/src/lib.rs b/src/lib.rs
index f205c3d..bc4d4ba 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -229,10 +229,14 @@ impl RawArgs {
}
/// Inject arguments before the [`RawArgs::next`]
- pub fn insert(&mut self, cursor: &ArgCursor, insert_items: &[&str]) {
+ pub fn insert(
+ &mut self,
+ cursor: &ArgCursor,
+ insert_items: impl IntoIterator<Item = impl Into<OsString>>,
+ ) {
self.items.splice(
cursor.cursor..cursor.cursor,
- insert_items.iter().map(OsString::from),
+ insert_items.into_iter().map(Into::into),
);
}