From b06b01455046e06b5a48ddb04d50acb7366bb723 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Thu, 26 May 2022 11:01:42 -0700 Subject: Update TEST_MAPPING Test: None Bug: 233924440 Change-Id: I9df9c62cd2f6972a6e12f4a698a06dfa1274cab9 --- TEST_MAPPING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TEST_MAPPING b/TEST_MAPPING index 407ec5c..0c90fc8 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -8,6 +8,11 @@ "path": "external/rust/crates/url" } ], + "postsubmit": [ + { + "name": "doh_unit_test" + } + ], "presubmit": [ { "name": "doh_unit_test" -- cgit v1.2.3 From ce14228b19c306f8a6e6717e7843201ff8a94ff2 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Tue, 14 Jun 2022 16:02:03 -0700 Subject: Update TEST_MAPPING Test: None Bug: 236006683 Change-Id: I0e1077f9a1ceac0b747f112606b8592e8603a6fe --- TEST_MAPPING | 5 ----- 1 file changed, 5 deletions(-) diff --git a/TEST_MAPPING b/TEST_MAPPING index 0c90fc8..407ec5c 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -8,11 +8,6 @@ "path": "external/rust/crates/url" } ], - "postsubmit": [ - { - "name": "doh_unit_test" - } - ], "presubmit": [ { "name": "doh_unit_test" -- cgit v1.2.3 From 8ad0809ab6d9d2ed63bfa3a63302bbc5871cb313 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Fri, 9 Dec 2022 15:53:33 +0100 Subject: Upgrade form_urlencoded to 1.1.0 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/form_urlencoded For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Iae8adb8d371eb57d00b5677ce4fb85e2d9413810 --- .cargo_vcs_info.json | 7 ++++--- Android.bp | 3 +-- Cargo.toml | 18 ++++++++---------- Cargo.toml.orig | 8 ++++---- METADATA | 14 +++++++++----- src/lib.rs | 6 +----- 6 files changed, 27 insertions(+), 29 deletions(-) diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index cc75365..aec1933 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,6 @@ { "git": { - "sha1": "ea7a69e9d69248ca6f69a6294abed225754f92fe" - } -} + "sha1": "359bc90a4f07224f79cc79c45dc873d44bcd6f14" + }, + "path_in_vcs": "form_urlencoded" +} \ No newline at end of file diff --git a/Android.bp b/Android.bp index ca5cb84..d2d6711 100644 --- a/Android.bp +++ b/Android.bp @@ -45,11 +45,10 @@ rust_library { host_supported: true, crate_name: "form_urlencoded", cargo_env_compat: true, - cargo_pkg_version: "1.0.1", + cargo_pkg_version: "1.1.0", srcs: ["src/lib.rs"], edition: "2018", rustlibs: [ - "libmatches", "libpercent_encoding", ], apex_available: [ diff --git a/Cargo.toml b/Cargo.toml index 4c9fae2..037361d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,26 +3,24 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] edition = "2018" +rust-version = "1.51" name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" authors = ["The rust-url developers"] description = "Parser and serializer for the application/x-www-form-urlencoded syntax, as used by HTML forms." -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/servo/rust-url" [lib] test = false -[dependencies.matches] -version = "0.1" [dependencies.percent-encoding] -version = "2.1.0" +version = "2.2.0" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 0c603bd..bdbb5ce 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,15 +1,15 @@ [package] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" authors = ["The rust-url developers"] description = "Parser and serializer for the application/x-www-form-urlencoded syntax, as used by HTML forms." repository = "https://github.com/servo/rust-url" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" edition = "2018" +rust-version = "1.51" [lib] test = false [dependencies] -matches = "0.1" -percent-encoding = { version = "2.1.0", path = "../percent_encoding" } +percent-encoding = { version = "2.2.0", path = "../percent_encoding" } diff --git a/METADATA b/METADATA index cffa7b4..e66dbb1 100644 --- a/METADATA +++ b/METADATA @@ -1,3 +1,7 @@ +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update rust/crates/form_urlencoded +# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md + name: "form_urlencoded" description: "Parser and serializer for the application/x-www-form-urlencoded syntax, as used by HTML forms." third_party { @@ -7,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/form_urlencoded/form_urlencoded-1.0.1.crate" + value: "https://static.crates.io/crates/form_urlencoded/form_urlencoded-1.1.0.crate" } - version: "1.0.1" + version: "1.1.0" license_type: NOTICE last_upgrade_date { - year: 2021 - month: 2 - day: 19 + year: 2022 + month: 12 + day: 9 } } diff --git a/src/lib.rs b/src/lib.rs index 765ee16..477594b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,9 +13,6 @@ //! Converts between a string (such as an URL’s query string) //! and a sequence of (name, value) pairs. -#[macro_use] -extern crate matches; - use percent_encoding::{percent_decode, percent_encode_byte}; use std::borrow::{Borrow, Cow}; use std::str; @@ -402,8 +399,7 @@ pub(crate) fn decode_utf8_lossy(input: Cow<'_, [u8]>) -> Cow<'_, str> { // replace invalid bytes with a placeholder. // First we do a debug_assert to confirm our description above. - let raw_utf8: *const [u8]; - raw_utf8 = utf8.as_bytes(); + let raw_utf8: *const [u8] = utf8.as_bytes(); debug_assert!(raw_utf8 == &*bytes as *const [u8]); // Given we know the original input bytes are valid UTF-8, -- cgit v1.2.3 From 0dc79d9ae74c018ddf5395303364727a71c6f0dd Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Mon, 30 Jan 2023 11:29:22 +0100 Subject: Update TEST_MAPPING Test: atest Change-Id: I53ccd2676707de10bc6a426e715893fe0dd37e98 --- TEST_MAPPING | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/TEST_MAPPING b/TEST_MAPPING index 407ec5c..b2d8ebc 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -6,16 +6,9 @@ }, { "path": "external/rust/crates/url" - } - ], - "presubmit": [ - { - "name": "doh_unit_test" - } - ], - "presubmit-rust": [ + }, { - "name": "doh_unit_test" + "path": "packages/modules/DnsResolver" } ] } -- cgit v1.2.3 From 561bc031e3108a2592ba9006115c335ae4863ee8 Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Tue, 7 Mar 2023 17:23:51 -0800 Subject: Make form_urlencoded available to product and vendor Bug: 270690570 Test: mma in external/rust/crates Change-Id: I23d39b8c50b84b19620f86a860acf1e76a579b28 --- Android.bp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Android.bp b/Android.bp index d2d6711..473d00e 100644 --- a/Android.bp +++ b/Android.bp @@ -55,5 +55,7 @@ rust_library { "//apex_available:platform", "com.android.resolv", ], + product_available: true, + vendor_available: true, min_sdk_version: "29", } -- cgit v1.2.3