From ace20a9f43c5bdee44f40e8fe4cefdd65e762372 Mon Sep 17 00:00:00 2001 From: bluss Date: Mon, 16 Oct 2017 22:45:27 +0200 Subject: [PATCH] DOC: Add docs for default values --- src/array_string.rs | 1 + src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/array_string.rs b/src/array_string.rs index ce98056..a02100a 100644 --- a/src/array_string.rs +++ b/src/array_string.rs @@ -31,6 +31,7 @@ pub struct ArrayString> { } impl> Default for ArrayString { + /// Return an empty `ArrayString` fn default() -> ArrayString { ArrayString::new() } diff --git a/src/lib.rs b/src/lib.rs index 3a36aa4..b7467da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -942,6 +942,7 @@ impl fmt::Debug for ArrayVec where A::Item: fmt::Debug { } impl Default for ArrayVec { + /// Return an empty array fn default() -> ArrayVec { ArrayVec::new() }