diff options
author | Andrew Walbran <qwandor@google.com> | 2022-11-30 13:53:11 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2022-11-30 13:53:11 +0000 |
commit | 716b366d0f15d93fbd929dcb1cc3474d57ef650c (patch) | |
tree | 31857d0ef19221f935f23fa5db8002aab8f9e0d6 | |
parent | 265156e5d1f7c5c37b33e1a1a21e7330b621d569 (diff) | |
download | clap_lex-716b366d0f15d93fbd929dcb1cc3474d57ef650c.tar.gz |
Upgrade clap_lex to 0.3.0.
Change-Id: Ib0016025d8c90015123452191b855c23fa98945d
-rw-r--r-- | .cargo_vcs_info.json | 6 | ||||
-rw-r--r-- | Android.bp | 58 | ||||
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
l--------- | LICENSE | 2 | ||||
-rw-r--r-- | METADATA | 19 | ||||
-rw-r--r-- | MODULE_LICENSE_APACHE2 (renamed from MODULE_LICENSE_MIT) | 0 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | cargo2android.json | 6 | ||||
-rw-r--r-- | src/lib.rs | 8 |
10 files changed, 43 insertions, 73 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 @@ -1,68 +1,14 @@ -// 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. -package { - default_applicable_licenses: ["external_rust_crates_clap_lex_license"], -} - -// Added automatically by a large-scale-change that took the approach of -// 'apply every license found to every target'. While this makes sure we respect -// every license restriction, it may not be entirely correct. -// -// e.g. GPL in an MIT project might only apply to the contrib/ directory. -// -// Please consider splitting the single license below into multiple licenses, -// taking care not to lose any license_kind information, and overriding the -// default license using the 'licenses: [...]' property on targets as needed. -// -// For unused files, consider creating a 'fileGroup' with "//visibility:private" -// to attach the license to, and including a comment whether the files may be -// used in the current project. -// -// large-scale-change included anything that looked like it might be a license -// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. -// -// Please consider removing redundant or irrelevant files from 'license_text:'. -// See: http://go/android-license-faq -license { - name: "external_rust_crates_clap_lex_license", - visibility: [":__subpackages__"], - license_kinds: [ - "SPDX-license-identifier-Apache-2.0", - "SPDX-license-identifier-MIT", - ], - license_text: [ - "LICENSE-APACHE", - "LICENSE-MIT", - ], -} - -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: [ @@ -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/**/*", @@ -1 +1 @@ -LICENSE-MIT
\ No newline at end of file +LICENSE-APACHE
\ No newline at end of file @@ -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 @@ -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/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 +} @@ -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), ); } |