about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-23 21:03:57 +0000
committerbors <bors@rust-lang.org>2021-04-23 21:03:57 +0000
commitbb491ed23937aef876622e4beb68ae95938b3bf9 (patch)
treed5383a2182442ee9c2dd0b0dae79dc04a2c98bc4 /library/alloc
parent481ba16439299eb07058a7107352c558fdba7f96 (diff)
parent62db03cd623c0c3a6cf13a1b8c3c13581a416fcc (diff)
Auto merge of #84490 - JohnTitor:rollup-wrdj4ko, r=JohnTitor
Rollup of 11 pull requests

Successful merges:

 - #80805 (Improve `Iterator::by_ref` example)
 - #84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>)
 - #84321 (rustdoc: Convert sub-variant toggle to HTML)
 - #84359 (:arrow_up: rust-analyzer)
 - #84374 (Clean up .gitignore)
 - #84387 (Move `sys_common::poison` to `sync::poison`)
 - #84430 (doc/platform-support: clarify UEFI support)
 - #84433 (Prevent control, shift and alt keys to make search input lose focus)
 - #84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls)
 - #84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile)
 - #84469 (Update comment on `PrimTy::name_str`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/vec/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 1b78356fde5..e459442dfcf 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -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()
     }
 }