mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Implements Default for mutable slices. Fixes: #29244
This commit is contained in:
parent
3f37f5a443
commit
36ce1c06a4
@ -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
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user