Subject: [PATCH 004/228] gnu: Add rust-as-variant-1.

From: Herman Rimm <[email-masked]>
Date: Sun, 18 Feb 2024 22:02:02 +0100

* gnu/packages/crates-io.scm (rust-as-variant-1): Add variable.
---
 gnu/packages/crates-io.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index dbe16c0e22..0bcf3ad231 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -3268,6 +3268,25 @@ (define-public rust-as-derive-utils-0.8
         ("rust-serde-derive" ,rust-serde-derive-1)
         ("rust-syn" ,rust-syn-1))))))
 
+(define-public rust-as-variant-1
+  (package
+    (name "rust-as-variant")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "as_variant" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "13vryhfcslf50f8j1msnxg5689bzwz56z45dgzxqd7r40wis53zk"))))
+    (build-system cargo-build-system)
+    (home-page "https://github.com/jplatte/as_variant")
+    (synopsis "Macro to convert enums with newtype variants to Option")
+    (description
+     "This package provides a simple macro to convert enums with newtype
+variants to `Option`s.")
+    (license license:mpl2.0)))
+
 (define-public rust-asio-sys-0.2
   (package
     (name "rust-asio-sys")
-- 
2.41.0