guix-patches
[Top][All Lists]
Advanced

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

[bug#60410] [PATCH 4/7] messages: Remove unused set intersection feature


From: Arun Isaac
Subject: [bug#60410] [PATCH 4/7] messages: Remove unused set intersection feature in search-bugs.
Date: Thu, 29 Dec 2022 20:23:57 +0000

* mumi/messages.scm (search-bugs): Remove unused set intersection
feature.
---
 mumi/messages.scm | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/mumi/messages.scm b/mumi/messages.scm
index fb305bb..75ac3b1 100644
--- a/mumi/messages.scm
+++ b/mumi/messages.scm
@@ -1,6 +1,6 @@
 ;;; mumi -- Mediocre, uh, mail interface
 ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus 
<rekado@elephly.net>
-;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019, 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This program is free software: you can redistribute it and/or
 ;;; modify it under the terms of the GNU Affero General Public License
@@ -250,16 +250,12 @@ PATCH-SET.  If PATCH-SET is not provided, return all 
patches."
                       message-numbers)
                  "\n")))
 
-(define* (search-bugs query #:key (sets '()) (max 400))
-  "Return a list of all bugs matching the given QUERY string.
-Intersect the result with the id sets in the list SETS."
-  (let* ((ids (map string->number
-                   (search query)))
-         (filtered (match sets
-                     (() ids)
-                     (_ (apply lset-intersection eq? ids sets)))))
-    (status-with-cache (if (> (length filtered) max)
-                           (take filtered max) filtered))))
+(define* (search-bugs query #:key (max 400))
+  "Return a list of all bugs matching the given QUERY string."
+  (let ((ids (map string->number
+                  (search query))))
+    (status-with-cache (if (> (length ids) max)
+                           (take ids max) ids))))
 
 (define (recent-bugs amount)
   "Return up to AMOUNT bugs with most recent activity."
-- 
2.38.1






reply via email to

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