diff options
author | Joel Galenson <jgalenson@google.com> | 2021-10-12 15:03:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-10-12 15:03:51 +0000 |
commit | 2a0294567863992ab9e0afff8c3c3ecf2395aa12 (patch) | |
tree | 3213722d927484b07274e13ba5428f1a8f51ed89 | |
parent | f5e72013b6ad9fb549954e734665097935d48ce4 (diff) | |
parent | faca07c8c3443821cd70f601dca4dc2dfe62e35d (diff) | |
download | tinyvec-2a0294567863992ab9e0afff8c3c3ecf2395aa12.tar.gz |
Merge "Upgrade rust/crates/tinyvec to 1.4.0" am: faca07c8c3
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/tinyvec/+/1833326
Change-Id: I4d9fe17adbf256bd181fb38781fd0678ae5f8d95
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 5 | ||||
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | Cargo.toml | 17 | ||||
-rw-r--r-- | Cargo.toml.orig | 13 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | src/array.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 4 |
8 files changed, 30 insertions, 30 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index a951fcc..3d0fa1e 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "a4bbfa9864d6a9d5ac607841025b517e618f3c8f" + "sha1": "7518868e4b9c802b214ce393f79f82fa13bef251" } } @@ -43,6 +43,8 @@ rust_library { name: "libtinyvec", host_supported: true, crate_name: "tinyvec", + cargo_env_compat: true, + cargo_pkg_version: "1.4.0", srcs: ["src/lib.rs"], edition: "2018", features: [ @@ -59,6 +61,3 @@ rust_library { ], min_sdk_version: "29", } - -// dependent_library ["feature_list"] -// tinyvec_macros-0.1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5226b..1bcc2a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog
+## 1.4.0
+
+* [saethlin](https://github.com/saethlin) stabilized the usage of const generics and array map with the `rustc_1_55` feature.
+ [pr 149](https://github.com/Lokathor/tinyvec/pull/149)
+
## 1.3.1
* Improved the performance of the `clone_from` method [pr 144](https://github.com/Lokathor/tinyvec/pull/144)
@@ -3,17 +3,16 @@ # 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" name = "tinyvec" -version = "1.3.1" +version = "1.4.0" authors = ["Lokathor <zefria@gmail.com>"] description = "`tinyvec` provides 100% safe vec-like data structures." keywords = ["vec", "no_std", "no-std"] @@ -21,11 +20,11 @@ categories = ["data-structures", "no-std"] license = "Zlib OR Apache-2.0 OR MIT" repository = "https://github.com/Lokathor/tinyvec" [package.metadata.docs.rs] -features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] +features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] rustdoc-args = ["--cfg", "docs_rs"] [package.metadata.playground] -features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] +features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] [profile.test] opt-level = 3 @@ -60,6 +59,6 @@ alloc = ["tinyvec_macros"] default = [] experimental_write_impl = [] grab_spare_slice = [] -nightly_const_generics = [] nightly_slice_partition_dedup = [] rustc_1_40 = [] +rustc_1_55 = ["rustc_1_40"] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index d0b0e31..a262ed1 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,7 +1,7 @@ [package] name = "tinyvec" description = "`tinyvec` provides 100% safe vec-like data structures." -version = "1.3.1" +version = "1.4.0" authors = ["Lokathor <zefria@gmail.com>"] edition = "2018" license = "Zlib OR Apache-2.0 OR MIT" @@ -31,14 +31,15 @@ grab_spare_slice = [] # DoubleEndedIterator::nth_back - 1.40 rustc_1_40 = [] +# features that require rustc 1.55 +# use const generics to implement Array for all array lengths +rustc_1_55 = ["rustc_1_40"] +
# allow use of nightly feature `slice_partition_dedup`, # will become useless once that is stabilized: # https://github.com/rust-lang/rust/issues/54279 nightly_slice_partition_dedup = [] -# use const generics for arrays -nightly_const_generics = [] -
# EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec` # and `SliceVec`. It works on Stable Rust, but Vec normally supports the # `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as @@ -46,11 +47,11 @@ nightly_const_generics = [] experimental_write_impl = [] [package.metadata.docs.rs] -features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] +features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] rustdoc-args = ["--cfg","docs_rs"] [package.metadata.playground] -features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] +features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] [profile.test] opt-level = 3 @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/tinyvec/tinyvec-1.3.1.crate" + value: "https://static.crates.io/crates/tinyvec/tinyvec-1.4.0.crate" } - version: "1.3.1" + version: "1.4.0" license_type: NOTICE last_upgrade_date { year: 2021 - month: 8 - day: 9 + month: 9 + day: 22 } } diff --git a/src/array.rs b/src/array.rs index 75f33c6..cc84aaf 100644 --- a/src/array.rs +++ b/src/array.rs @@ -8,7 +8,7 @@ ///
/// You are generally **not** expected to need to implement this yourself. It is
/// already implemented for all the major array lengths (`0..=32` and the powers
-/// of 2 up to 4,096).
+/// of 2 up to 4,096), or for all array lengths with the feature `rustc_1_55`.
///
/// **Additional lengths can easily be added upon request.**
///
@@ -41,8 +41,8 @@ pub trait Array { fn default() -> Self;
}
-#[cfg(feature = "nightly_const_generics")]
+#[cfg(feature = "rustc_1_55")]
mod const_generic_impl;
-#[cfg(not(feature = "nightly_const_generics"))]
+#[cfg(not(feature = "rustc_1_55"))]
mod generated_impl;
@@ -4,10 +4,6 @@ feature = "nightly_slice_partition_dedup",
feature(slice_partition_dedup)
)]
-#![cfg_attr(
- feature = "nightly_const_generics",
- feature(min_const_generics, array_map)
-)]
#![cfg_attr(docs_rs, feature(doc_cfg))]
#![warn(clippy::missing_inline_in_public_items)]
#![warn(clippy::must_use_candidate)]
|