Implements Default for mutable slices. Fixes: #29244

This commit is contained in:
James McGlashan 2015-10-23 14:39:50 +11:00
parent 3f37f5a443
commit 36ce1c06a4

View File

@ -655,6 +655,11 @@ impl<'a, T> Default for &'a [T] {
fn default() -> &'a [T] { &[] }
}
#[stable(feature = "mut_slice_default", since = "1.5.0")]
impl<'a, T> Default for &'a mut [T] {
fn default() -> &'a mut [T] { &mut [] }
}
//
// Iterators
//