aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2023-03-02 18:58:50 +0100
committerJeff Vander Stoep <jeffv@google.com>2023-03-02 18:58:50 +0100
commitb3a08ad1208082935ac305056ff5f430e7b460ae (patch)
tree9fe26166fc939c4ca5ac18852d73fb0e22004f69
parent0808c905b680e04611e2708c4a0ca666a61bbb26 (diff)
downloadbstr-b3a08ad1208082935ac305056ff5f430e7b460ae.tar.gz
Upgrade bstr to 1.3.0
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/bstr For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Id8b9de00047540414f9aea4431086ba808c94e4c
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA8
-rw-r--r--src/impls.rs7
6 files changed, 15 insertions, 8 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 117fa04..ff424fa 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "65993b58be1547bfc0de9ad8c1c8f3d3fcb0a32f"
+ "sha1": "f72910a192f37e85932211bef957fbadaecefbaf"
},
"path_in_vcs": ""
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 567b12b..1ca78fb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -44,7 +44,7 @@ rust_library {
host_supported: true,
crate_name: "bstr",
cargo_env_compat: true,
- cargo_pkg_version: "1.2.0",
+ cargo_pkg_version: "1.3.0",
srcs: ["src/lib.rs"],
edition: "2021",
features: [
diff --git a/Cargo.toml b/Cargo.toml
index b74217b..135bd38 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.60"
name = "bstr"
-version = "1.2.0"
+version = "1.3.0"
authors = ["Andrew Gallant <jamslam@gmail.com>"]
exclude = ["/.github"]
description = "A string type that is not required to be valid UTF-8."
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index bdfa0b7..ef559d7 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "bstr"
-version = "1.2.0" #:version
+version = "1.3.0" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = "A string type that is not required to be valid UTF-8."
documentation = "https://docs.rs/bstr"
diff --git a/METADATA b/METADATA
index c21ad25..587f058 100644
--- a/METADATA
+++ b/METADATA
@@ -11,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/bstr/bstr-1.2.0.crate"
+ value: "https://static.crates.io/crates/bstr/bstr-1.3.0.crate"
}
- version: "1.2.0"
+ version: "1.3.0"
license_type: NOTICE
last_upgrade_date {
year: 2023
- month: 2
- day: 15
+ month: 3
+ day: 2
}
}
diff --git a/src/impls.rs b/src/impls.rs
index 7ae4510..c063cb6 100644
--- a/src/impls.rs
+++ b/src/impls.rs
@@ -563,6 +563,13 @@ mod bstr {
}
}
+ impl AsRef<BStr> for BStr {
+ #[inline]
+ fn as_ref(&self) -> &BStr {
+ self
+ }
+ }
+
impl AsRef<BStr> for [u8] {
#[inline]
fn as_ref(&self) -> &BStr {