From 32832aa0f2cc7db5cbb4ed88bd331733227792d4 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Thu, 10 Sep 2015 13:04:30 +0100 Subject: [PATCH] Add `Default` implementation for `ArrayVec` --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 44835a6..bb42697 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -636,3 +636,9 @@ impl AsMut<[A::Item]> for ArrayVec { impl fmt::Debug for ArrayVec where A::Item: fmt::Debug { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (**self).fmt(f) } } + +impl Default for ArrayVec { + fn default() -> ArrayVec { + ArrayVec::new() + } +}