summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve George <steve@futurile.net>2023-10-23 23:21:19 +0100
committerEfraim Flashner <efraim@flashner.co.il>2023-10-24 14:39:44 +0300
commitbc4196fa909a4b03954124b0fc9a848a68e1ac3a (patch)
treef5006393482844b89018472d42bae5de309bb760
parent179ecc41a08504bcd6e54e36052139384f2736fc (diff)
downloadguix-bc4196fa909a4b03954124b0fc9a848a68e1ac3a.tar.gz
gnu: Add rust-array-init-2.
* gnu/packages/crates-io.scm (rust-array-init-2): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/packages/crates-io.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 44deebc06f..e7b84b7f4d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -4088,6 +4088,26 @@ initializing large arrays (greater than 32 elements), or arrays of types which
 do not implement the copy or default traits.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-array-init-2
+  (package
+    (name "rust-array-init")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "array-init" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1z0bh6grrkxlbknq3xyipp42rasngi806y92fiddyb2n99lvfqix"))))
+    (build-system cargo-build-system)
+    (home-page "https://github.com/Manishearth/array-init/")
+    (synopsis "Safe wrapper for initializing fixed-size arrays")
+    (description
+     "A crate that removes the need to fill an array before running
+initialisers.  Provides an init closure that's called for each element of the
+array.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-array-macro-1
   (package
     (name "rust-array-macro")