From a0e78c1fb910ea1b0a87b7df8ae11bcb5c5de81b Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 12 Feb 2019 19:27:58 +0100 Subject: [PATCH 1/2] mention serde feature in the changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdbb469f..5b963387 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,13 +12,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - All containers now implement `Clone` + - `spsc::Queue` now implements `Debug`, `Hash`, `PartialEq` and `Eq` + - `LinearMap` now implements `Debug`, `FromIterator`, `IntoIter`, `PartialEq`, `Eq` and `Default` + - `BinaryHeap` now implements `Debug` and `Default` + - `String` now implements `FromStr`, `Hash`, `From` and `Default` + - `Vec` now implements `Hash` and `Default` +- A "serde" Cargo feature that when enabled adds a `serde::Serialize` and + `serde::Deserialize` implementations to each collection. + ## [v0.4.1] - 2018-12-16 ### Changed From 1cfc84789245d834d545f7935e062a82f39e9dbf Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 12 Feb 2019 19:40:51 +0100 Subject: [PATCH 2/2] document and guarantee MSRV --- .travis.yml | 5 +++++ src/lib.rs | 30 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7430c42e..fceab721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,11 @@ language: rust matrix: include: + # MSRV + - env: TARGET=x86_64-unknown-linux-gnu + rust: 1.30.0 + if: branch != master + - env: TARGET=x86_64-unknown-linux-gnu rust: stable if: branch != master diff --git a/src/lib.rs b/src/lib.rs index 07f79017..b80112b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,31 +51,37 @@ //! - [`IndexMap`](struct.IndexMap.html) -- hash table //! - [`IndexSet`](struct.IndexSet.html) -- hash set //! - [`LinearMap`](struct.LinearMap.html) -//! - [`Queue`](spsc/struct.Queue.html) -- single producer single consumer lockless queue +//! - [`spsc::Queue`](spsc/struct.Queue.html) -- single producer single consumer lock-free queue //! - [`String`](struct.String.html) //! - [`Vec`](struct.Vec.html) //! +//! # Minimum Supported Rust Version (MSRV) //! -//! In order to target the Rust stable toolchain, there are some feature gates. -//! The features need to be enabled in `Cargo.toml` in order to use them. -//! Once the underlaying features in Rust are stable, -//! these feature gates might be activated by default. +//! This crate is guaranteed to compile on stable Rust 1.30 and up with its default set of features. +//! It *might* compile on older versions but that may change in any new patch release. +//! +//! # Cargo features +//! +//! In order to target the Rust stable toolchain, there are some opt-in Cargo features. The features +//! need to be enabled in `Cargo.toml` in order to use them. Once the underlying features in Rust +//! are stable, these feature gates may be activated by default. //! //! Example of `Cargo.toml`: //! -//! ```text -//! ... +//! ``` text +//! # .. //! [dependencies] //! heapless = { version = "0.4.0", features = ["const-fn"] } -//! ... -//! +//! # .. //! ``` //! -//! Currently the following features are availbale and not active by default: +//! Currently the following features are available and not active by default: //! -//! - `"const-fn"` -- Enable the nightly `const_fn` feature and make most `new` methods `const`. -//! This way they can be used to initialize static memory at compile time. +//! - `"const-fn"` -- Enables the nightly `const_fn` and `untagged_unions` features and makes most +//! `new` methods `const`. This way they can be used to initialize static memory at compile time. //! +//! - `"smaller-atomics"` -- Lets you initialize `spsc::Queue`s with smaller head / tail indices +//! (they default to `usize`), shrinking the overall size of the queue. #![allow(warnings)] #![deny(missing_docs)]