diff --git a/Cargo.toml b/Cargo.toml index 849cb52..bdfaaaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,11 @@ categories = ["data-structures", "no-std"] documentation = "https://docs.rs/holodeque" repository = "https://github.com/dataphract/holodeque" readme = "README.md" -version = "0.2.0" # if changed, html_root_url must also be changed! +version = "0.2.1" # if changed, html_root_url must also be changed! edition = "2018" +rust_version = "1.55.0" + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/README.md b/README.md index 9564fa5..fe60563 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,6 @@ Array- and slice-backed double-ended queues in 100% safe Rust. This crate provides `ArrayDeque` and `SliceDeque`, fixed-size ring buffers with interfaces similar to the standard library's `VecDeque`. -`holodeque` makes use of the unstable `array_map` feature to provide `Default` -initialization of arbitrarily-sized arrays. As a result, **a `nightly` compiler -is required until this feature is stabilized**. See the [tracking issue] for its -current status. - -[tracking issue]: https://github.com/rust-lang/rust/issues/75243 - ## License Licensed under either of diff --git a/src/array_deque.rs b/src/array_deque.rs index 224ba96..4b9cd12 100644 --- a/src/array_deque.rs +++ b/src/array_deque.rs @@ -5,7 +5,7 @@ use crate::{ BaseDeque, CapacityError, DequeDrain, DequeIter, }; -#[derive(Clone, Debug)] +#[derive(Clone, Copy, Debug)] pub(crate) struct ArrayMeta { layout: MetaLayout, } @@ -43,6 +43,8 @@ where items: [T; N], } +impl Copy for ArrayDeque {} + impl BaseDeque for ArrayDeque where T: Default, diff --git a/src/lib.rs b/src/lib.rs index bc07153..56f79e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,14 +3,7 @@ //! This crate provides [`ArrayDeque`] and [`SliceDeque`], fixed-size ring //! buffers with interfaces similar to the standard library's [`VecDeque`]. //! -//! `holodeque` makes use of the unstable [`array_map`] feature to provide -//! `Default` initialization of arbitrarily-sized arrays. As a result, **a -//! `nightly` compiler is required until this feature is stabilized**. See the -//! [tracking issue] for its current status. -//! //! [`VecDeque`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html -//! [`array_map`]: https://doc.rust-lang.org/unstable-book/library-features/array-map.html -//! [tracking issue]: https://github.com/rust-lang/rust/issues/75243 //! //! # Example //! @@ -84,11 +77,10 @@ //! [`MaybeUninit`]: https://doc.rust-lang.org/core/mem/union.MaybeUninit.html //! [`tinyvec`]: https://docs.rs/tinyvec -#![feature(array_map)] #![forbid(unsafe_code)] #![warn(missing_docs)] #![cfg_attr(not(feature = "std"), no_std)] -#![doc(html_root_url = "https://docs.rs/holodeque/0.2.0")] +#![doc(html_root_url = "https://docs.rs/holodeque/0.2.1")] pub mod array_deque; mod meta;