0.7.0
This commit is contained in:
+1
-4
@@ -73,10 +73,7 @@ impl<const CAP: usize> ArrayString<CAP>
|
||||
/// ```
|
||||
/// use arrayvec::ArrayString;
|
||||
///
|
||||
/// let mut string = ArrayString::<16>::new();
|
||||
/// string.push_str("foo");
|
||||
/// assert_eq!(&string[..], "foo");
|
||||
/// assert_eq!(string.capacity(), 16);
|
||||
/// static ARRAY: ArrayString<1024> = ArrayString::new_const();
|
||||
/// ```
|
||||
pub const fn new_const() -> ArrayString<CAP> {
|
||||
assert_capacity_limit_const!(CAP);
|
||||
|
||||
+1
-5
@@ -91,11 +91,7 @@ impl<T, const CAP: usize> ArrayVec<T, CAP> {
|
||||
/// ```
|
||||
/// use arrayvec::ArrayVec;
|
||||
///
|
||||
/// let mut array = ArrayVec::<_, 16>::new();
|
||||
/// array.push(1);
|
||||
/// array.push(2);
|
||||
/// assert_eq!(&array[..], &[1, 2]);
|
||||
/// assert_eq!(array.capacity(), 16);
|
||||
/// static ARRAY: ArrayVec<u8, 1024> = ArrayVec::new_const();
|
||||
/// ```
|
||||
pub const fn new_const() -> ArrayVec<T, CAP> {
|
||||
assert_capacity_limit_const!(CAP);
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
//! - Optional
|
||||
//! - Enable serialization for ArrayVec and ArrayString using serde 1.x
|
||||
//!
|
||||
//! - `unstable-const-fn`
|
||||
//! - **deprecated** (has no effect)
|
||||
//! - Not needed, [`ArrayVec::new`] and [`ArrayString::new`] are always `const fn` now
|
||||
//!
|
||||
//! ## Rust Version
|
||||
//!
|
||||
//! This version of arrayvec requires Rust 1.51 or later.
|
||||
|
||||
Reference in New Issue
Block a user