Skip to content

Commit

Permalink
Remove duplicated fn(Box<[T]>) -> Vec<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
calebsander committed Apr 22, 2021
1 parent 6df26f8 commit f505d61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2810,8 +2810,7 @@ impl<T, A: Allocator> From<Box<[T], A>> for Vec<T, A> {
/// assert_eq!(Vec::from(b), vec![1, 2, 3]);
/// ```
fn from(s: Box<[T], A>) -> Self {
let len = s.len();
Self { buf: RawVec::from_box(s), len }
s.into_vec()
}
}

Expand Down

0 comments on commit f505d61

Please sign in to comment.