+5
-1
@@ -15,3 +15,7 @@ language: rust | ||
| env: | ||
| - NODROP_FEATURES='no_drop_flag use_needs_drop' | ||
| - NODROP_FEATURES='use_needs_drop' | ||
| - rust: nightly | ||
| env: | ||
| - FEATURES='use_union' | ||
| - NODROP_FEATURES='use_union' | ||
| branches: | ||
@@ -18,0 +22,0 @@ only: |
+3
-2
| [package] | ||
| name = "arrayvec" | ||
| version = "0.3.16" | ||
| version = "0.3.17" | ||
| authors = ["bluss"] | ||
@@ -18,3 +18,3 @@ license = "MIT/Apache-2.0" | ||
| [dependencies.nodrop] | ||
| version = "0.1.6" | ||
| version = "0.1.8" | ||
| path = "nodrop" | ||
@@ -26,1 +26,2 @@ default-features = false | ||
| std = ["odds/std", "nodrop/std"] | ||
| use_union = ["nodrop/use_union"] |
+2
-2
@@ -1,2 +0,2 @@ | ||
| DOCCRATES = arrayvec nodrop odds | ||
| DOCCRATES = arrayvec nodrop nodrop_union odds | ||
@@ -6,3 +6,3 @@ # deps to delete the generated docs | ||
| FEATURES = odds/unstable | ||
| FEATURES = "odds/unstable nodrop/use_union" | ||
@@ -9,0 +9,0 @@ VERSIONS = $(patsubst %,target/VERS/%,$(DOCCRATES)) |
+28
-0
@@ -25,2 +25,7 @@ | ||
| - 0.3.17 | ||
| - Added crate feature ``use_union`` which forwards to the nodrop crate feature | ||
| - Added methods ``.is_full()`` to ``ArrayVec`` and ``ArrayString``. | ||
| - 0.3.16 | ||
@@ -73,2 +78,14 @@ | ||
| - 0.1.8 | ||
| - Add crate feature ``use_union`` that uses untagged unions to implement NoDrop. | ||
| Finally we have an implementation without hacks, without a runtime flag, | ||
| and without an actual ``Drop`` impl (which was needed to suppress drop). | ||
| The crate feature requires nightly and is unstable. | ||
| - 0.1.7 | ||
| - Remove crate feature ``no_drop_flag``, because it doesn't compile on nightly | ||
| anymore. Drop flags are gone anyway! | ||
| - 0.1.6 | ||
@@ -84,3 +101,14 @@ | ||
| Recent Changes (nodrop-union) | ||
| ----------------------- | ||
| - 0.1.9 | ||
| - Add ``Copy, Clone`` implementations | ||
| - 0.1.8 | ||
| - Initial release | ||
| License | ||
@@ -87,0 +115,0 @@ ======= |
+12
-0
@@ -80,2 +80,14 @@ use std::borrow::Borrow; | ||
| /// Return if the `ArrayString` is completely filled. | ||
| /// | ||
| /// ``` | ||
| /// use arrayvec::ArrayString; | ||
| /// | ||
| /// let mut string = ArrayString::<[_; 1]>::new(); | ||
| /// assert!(!string.is_full()); | ||
| /// string.push_str("A"); | ||
| /// assert!(string.is_full()); | ||
| /// ``` | ||
| pub fn is_full(&self) -> bool { self.len() == self.capacity() } | ||
| /// Adds the given char to the end of the string. | ||
@@ -82,0 +94,0 @@ /// |
+18
-0
@@ -10,2 +10,8 @@ //! **arrayvec** provides the types `ArrayVec` and `ArrayString`: | ||
| //! - Use libstd | ||
| //! | ||
| //! - `use_union` | ||
| //! - Optional | ||
| //! - Requires Rust nightly channel | ||
| //! - Use the unstable feature untagged unions for the internal implementation, | ||
| //! which has reduced space overhead | ||
| #![cfg_attr(not(feature="std"), no_std)] | ||
@@ -129,2 +135,14 @@ extern crate odds; | ||
| /// Return if the `ArrayVec` is completely filled. | ||
| /// | ||
| /// ``` | ||
| /// use arrayvec::ArrayVec; | ||
| /// | ||
| /// let mut array = ArrayVec::<[_; 1]>::new(); | ||
| /// assert!(!array.is_full()); | ||
| /// array.push(1); | ||
| /// assert!(array.is_full()); | ||
| /// ``` | ||
| pub fn is_full(&self) -> bool { self.len() == self.capacity() } | ||
| /// Push `element` to the end of the vector. | ||
@@ -131,0 +149,0 @@ /// |