Implement Default for Box<[T]>

This commit is contained in:
Jorge Aparicio 2014-11-06 12:52:45 -05:00
parent 679eb9191d
commit 73b86e4778

View File

@ -48,6 +48,10 @@ impl<T: Default> Default for Box<T> {
fn default() -> Box<T> { box Default::default() }
}
impl<T> Default for Box<[T]> {
fn default() -> Box<[T]> { box [] }
}
#[unstable]
impl<T: Clone> Clone for Box<T> {
/// Returns a copy of the owned box.