+9
-9
@@ -15,3 +15,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "arrayvec" | ||
| version = "0.4.1" | ||
| version = "0.4.2" | ||
| authors = ["bluss"] | ||
@@ -29,2 +29,6 @@ description = "A vector with fixed capacity, backed by an array (it can be stored on the stack too). Implements fixed capacity ArrayVec and ArrayString." | ||
| no-dev-version = true | ||
| [dependencies.odds] | ||
| version = "0.2.23" | ||
| default-features = false | ||
| [dependencies.nodrop] | ||
@@ -34,6 +38,2 @@ version = "0.1.8" | ||
| [dependencies.odds] | ||
| version = "0.2.23" | ||
| default-features = false | ||
| [dependencies.serde] | ||
@@ -43,12 +43,12 @@ version = "1.0" | ||
| default-features = false | ||
| [dev-dependencies.serde_test] | ||
| version = "1.0" | ||
| [dev-dependencies.matches] | ||
| version = "0.1" | ||
| [dev-dependencies.serde_test] | ||
| version = "1.0" | ||
| [features] | ||
| std = ["odds/std", "nodrop/std"] | ||
| default = ["std"] | ||
| serde-1 = ["serde"] | ||
| default = ["std"] | ||
| use_union = [] |
+4
-0
@@ -25,2 +25,6 @@ | ||
| - 0.4.2 | ||
| - Add constructor method ``new`` to ``CapacityError``. | ||
| - 0.4.1 | ||
@@ -27,0 +31,0 @@ |
@@ -15,3 +15,2 @@ use std::borrow::Borrow; | ||
| use CapacityError; | ||
| use errors::PubCrateNew; | ||
| use odds::char::encode_utf8; | ||
@@ -18,0 +17,0 @@ |
+3
-8
@@ -13,8 +13,5 @@ use std::fmt; | ||
| pub trait PubCrateNew<T> { | ||
| fn new(elt: T) -> Self; | ||
| } | ||
| impl<T> PubCrateNew<T> for CapacityError<T> { | ||
| fn new(element: T) -> CapacityError<T> { | ||
| impl<T> CapacityError<T> { | ||
| /// Create a new `CapacityError` from `element`. | ||
| pub fn new(element: T) -> CapacityError<T> { | ||
| CapacityError { | ||
@@ -24,5 +21,3 @@ element: element, | ||
| } | ||
| } | ||
| impl<T> CapacityError<T> { | ||
| /// Extract the overflowing element | ||
@@ -29,0 +24,0 @@ pub fn element(self) -> T { |
+0
-1
@@ -72,3 +72,2 @@ //! **arrayvec** provides the types `ArrayVec` and `ArrayString`: | ||
| pub use array_string::ArrayString; | ||
| use errors::PubCrateNew; | ||
| pub use errors::CapacityError; | ||
@@ -75,0 +74,0 @@ |
Sorry, the diff of this file is not supported yet