guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19/43: gnu: Add rust-peeking-take-while.


From: guix-commits
Subject: 19/43: gnu: Add rust-peeking-take-while.
Date: Mon, 12 Aug 2019 05:02:12 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit f22f05d901854add1208789919bca2e450f0f915
Author: Efraim Flashner <address@hidden>
Date:   Sun Aug 4 13:53:57 2019 +0300

    gnu: Add rust-peeking-take-while.
    
    * gnu/packages/crates-io.scm (rust-peeking-take-while): New variable.
---
 gnu/packages/crates-io.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ac5d68a..f863251 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -371,6 +371,29 @@ whether an expression matches a pattern.")
     (license (list license:asl2.0
                    license:expat))))
 
+(define-public rust-peeking-take-while
+  (package
+    (name "rust-peeking-take-while")
+    (version "0.1.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "peeking_take_while" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "16bhqr6rdyrp12zv381cxaaqqd0pwysvm1q8h2ygihvypvfprc8r"))))
+    (build-system cargo-build-system)
+    (home-page "https://github.com/fitzgen/peeking_take_while";)
+    (synopsis "Provides the peeking_take_while iterator adaptor method")
+    (description
+      "Like @code{Iterator::take_while}, but calls the predicate on a peeked
+value.  This allows you to use @code{Iterator::by_ref} and
+@code{Iterator::take_while} together, and still get the first value for which
+the @code{take_while} predicate returned false after dropping the 
@code{by_ref}.")
+    (license (list license:asl2.0
+                   license:expat))))
+
 (define-public rust-proc-macro2
   (package
     (name "rust-proc-macro2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]