aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-10-12 14:47:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-10-12 14:47:44 +0000
commitfaca07c8c3443821cd70f601dca4dc2dfe62e35d (patch)
tree3213722d927484b07274e13ba5428f1a8f51ed89
parentf5e72013b6ad9fb549954e734665097935d48ce4 (diff)
parent153eaf0a1efb03649054d826c49449076c0e397d (diff)
downloadtinyvec-faca07c8c3443821cd70f601dca4dc2dfe62e35d.tar.gz
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp5
-rw-r--r--CHANGELOG.md5
-rw-r--r--Cargo.toml17
-rw-r--r--Cargo.toml.orig13
-rw-r--r--METADATA8
-rw-r--r--src/array.rs6
-rw-r--r--src/lib.rs4
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"
}
}
diff --git a/Android.bp b/Android.bp
index 47bf80c..30327d3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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)
diff --git a/Cargo.toml b/Cargo.toml
index fec505e..3ab13bd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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
diff --git a/METADATA b/METADATA
index b1c756c..8445b96 100644
--- a/METADATA
+++ b/METADATA
@@ -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;
diff --git a/src/lib.rs b/src/lib.rs
index ce06601..b3ee259 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)]