From 6ea8e8c0bf13f8662a6a0a81ed829b3db49bfa65 Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 6 Aug 2017 18:23:35 +0200 Subject: [PATCH 1/6] DOC: Update root crate url --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 08dab40..3098895 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,7 @@ //! //! This version of arrayvec requires Rust 1.15 or later. //! -#![doc(html_root_url="https://docs.rs/arrayvec/0.3/")] +#![doc(html_root_url="https://docs.rs/arrayvec/0.4/")] #![cfg_attr(not(feature="std"), no_std)] extern crate odds; extern crate nodrop; From b2b377117ab51bde361ff4e988d60026e2b3554c Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 6 Aug 2017 18:23:17 +0200 Subject: [PATCH 2/6] DOC: Update doc for and disclaimers for crate features --- src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3098895..65e454e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,13 +5,16 @@ //! //! - `std` //! - Optional, enabled by default -//! - Use libstd +//! - Use libstd; disable to use `no_std` instead. //! //! - `use_union` //! - Optional //! - Requires Rust nightly channel +//! - Experimental: This flag uses nightly so it may break unexpectedly +//! at some point; since it doesn't change API this flag may also change +//! to do nothing in the future. //! - Use the unstable feature untagged unions for the internal implementation, -//! which has reduced space overhead +//! which may have reduced space overhead //! //! ## Rust Version //! From cc09d7f17bb5736a5c749ac04bf11d2b22189afc Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 6 Aug 2017 18:30:33 +0200 Subject: [PATCH 3/6] DOC: Relnote for 0.4 --- README.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.rst b/README.rst index 325a07c..3f4126b 100644 --- a/README.rst +++ b/README.rst @@ -22,6 +22,23 @@ __ https://bluss.github.io/arrayvec Recent Changes (arrayvec) ------------------------- +- 0.4.0 + + - Reformed signatures and error handling by @bluss and @tbu-: + + - ``ArrayVec``'s ``push, insert, remove, swap_remove`` now match ``Vec``'s + corresponding signature and panic on capacity errors where applicable. + - Add fallible methods ``try_push, insert`` and checked methods + ``pop_at, swap_pop``. + - Similar changes to ``ArrayString``'s push methods. + + - Use internal version of ``RangeArgument`` trait + - Add array sizes 50, 150, 200 by @daboross + - Support serde 1.0 by @daboross + - New method ``.push_unchecked()`` by @niklasf + - ``ArrayString`` implements ``PartialOrd, Ord`` by @tbu- + - Require Rust 1.15 + - 0.3.21 - Use ``encode_utf8`` from crate odds From 2de36ba2cab33a7421a2136e8cd159a98352d7f3 Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 25 Mar 2017 15:15:07 +0100 Subject: [PATCH 4/6] Add 65536 to the Array impls --- src/array.rs | 8 ++++++++ tests/tests.rs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/array.rs b/src/array.rs index effe4a0..d5b45e2 100644 --- a/src/array.rs +++ b/src/array.rs @@ -46,6 +46,13 @@ impl Index for u16 { fn from(ix: usize) -> Self { ix as u16 } } +impl Index for u32 { + #[inline(always)] + fn to_usize(self) -> usize { self as usize } + #[inline(always)] + fn from(ix: usize) -> Self { ix as u32 } +} + impl Index for usize { #[inline(always)] fn to_usize(self) -> usize { self } @@ -80,4 +87,5 @@ fix_array_impl_recursive!(u8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 40, 48, 50, 56, 64, 72, 96, 100, 128, 160, 192, 200, 224,); fix_array_impl_recursive!(u16, 256, 384, 512, 768, 1024, 2048, 4096, 8192, 16384, 32768,); +fix_array_impl_recursive!(u32, 1 << 16,); diff --git a/tests/tests.rs b/tests/tests.rs index 7db5529..ae1eb9e 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -450,3 +450,9 @@ fn test_pop_at() { assert_eq!(v.pop_at(2), None); assert_eq!(&v[..], &["a", "d"]); } + +#[test] +fn test_sizes() { + let v = ArrayVec::from([0u8; 1 << 16]); + assert_eq!(vec![0u8; v.len()], &v[..]); +} From 327760edfac8b7769531137c02ef910998cea0e1 Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 6 Aug 2017 18:44:55 +0200 Subject: [PATCH 5/6] DOC: Update changelog with entries from 0.3 branch --- README.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.rst b/README.rst index 3f4126b..fcf1bc3 100644 --- a/README.rst +++ b/README.rst @@ -39,6 +39,15 @@ Recent Changes (arrayvec) - ``ArrayString`` implements ``PartialOrd, Ord`` by @tbu- - Require Rust 1.15 +- 0.3.23 + + - Implement ``PartialOrd, Ord`` as well as ``PartialOrd`` for + ``ArrayString``. + +- 0.3.22 + + - Implement ``Array`` for the 65536 size + - 0.3.21 - Use ``encode_utf8`` from crate odds From 878fef8d8a6e878c87dcf71a9373b04edda29089 Mon Sep 17 00:00:00 2001 From: bluss Date: Sun, 6 Aug 2017 21:07:26 +0200 Subject: [PATCH 6/6] MAINT: Require Rust 1.14 --- .travis.yml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77d30d2..95bd3c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ env: - FEATURES='serde-1' matrix: include: - - rust: 1.15.0 + - rust: 1.14.0 - rust: stable env: - NODEFAULT=1 diff --git a/src/lib.rs b/src/lib.rs index 65e454e..c32f723 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! //! ## Rust Version //! -//! This version of arrayvec requires Rust 1.15 or later. +//! This version of arrayvec requires Rust 1.14 or later. //! #![doc(html_root_url="https://docs.rs/arrayvec/0.4/")] #![cfg_attr(not(feature="std"), no_std)]