mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-02 00:07:42 +03:00
limit From impl to LengthAtMost32
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
+4
-1
@@ -2398,7 +2398,10 @@ fn from(s: &mut [T]) -> Vec<T> {
|
||||
}
|
||||
|
||||
#[stable(feature = "vec_from_array", since = "1.42.0")]
|
||||
impl<T, const N: usize> From<[T; N]> for Vec<T> {
|
||||
impl<T, const N: usize> From<[T; N]> for Vec<T>
|
||||
where
|
||||
[T; N]: LengthAtMost32,
|
||||
{
|
||||
fn from(arr: [T; N]) -> Self {
|
||||
<[T]>::into_vec(box arr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user