We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc7d801 commit 5b115fcCopy full SHA for 5b115fc
library/core/src/array/mod.rs
@@ -355,6 +355,7 @@ trait SpecArrayClone: Clone {
355
356
#[cfg(not(bootstrap))]
357
impl<T: Clone> SpecArrayClone for T {
358
+ #[inline]
359
default fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
360
// SAFETY: we know for certain that this iterator will yield exactly `N`
361
// items.
@@ -364,6 +365,7 @@ impl<T: Clone> SpecArrayClone for T {
364
365
366
367
impl<T: Copy> SpecArrayClone for T {
368
369
fn clone<const N: usize>(array: &[T; N]) -> [T; N] {
370
*array
371
}
0 commit comments