From 62734d3128fb90905e761b370b72a1992adfb6e4 Mon Sep 17 00:00:00 2001 From: "Richard Dodd (dodj)" Date: Sat, 30 Jun 2018 21:09:32 +0000 Subject: [PATCH 1/2] Add impls for powers of 2 length arrays. It would be really nice if there could be more array impls. I know that const generics are coming, but this would allow me to avoid having to write a lot of these impls myself, which would save me a lot of time, and make the eventual conversion to const generics a zero-work job for me. :) --- src/libcore/array.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 3d24f8902bd83..77d4ebaff64c2 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -260,7 +260,7 @@ array_impls! { 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 - 30 31 32 + 30 31 32 64 128 256 512 1024 } // The Default impls cannot be generated using the array_impls! macro because From 3ba0b3082178cc2ea9640991ce5523ae9525bb5a Mon Sep 17 00:00:00 2001 From: "Richard Dodd (dodj)" Date: Sun, 1 Jul 2018 16:12:38 +0000 Subject: [PATCH 2/2] Update array.rs --- src/libcore/array.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 77d4ebaff64c2..d394b15983c61 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -260,7 +260,7 @@ array_impls! { 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 - 30 31 32 64 128 256 512 1024 + 30 31 32 48 64 128 256 512 1024 } // The Default impls cannot be generated using the array_impls! macro because