Skip to content

Commit 73b86e4

Browse files
author
Jorge Aparicio
committed
Implement Default for Box<[T]>
1 parent 679eb91 commit 73b86e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/liballoc/boxed.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ impl<T: Default> Default for Box<T> {
4848
fn default() -> Box<T> { box Default::default() }
4949
}
5050

51+
impl<T> Default for Box<[T]> {
52+
fn default() -> Box<[T]> { box [] }
53+
}
54+
5155
#[unstable]
5256
impl<T: Clone> Clone for Box<T> {
5357
/// Returns a copy of the owned box.

0 commit comments

Comments
 (0)