[PATCH v3 3/3] emacs: Use `dolist' instead of `mapcar' for side-effects

Subject:[PATCH v3 3/3] emacs: Use `dolist' instead of `mapcar' for side-effects

Date:Sat, 25 Apr 2020 22:18:09 +0200

To:notmuch@notmuchmail.org

Cc:

From:Jonas Bernoulli


As recommended by the byte-compiler.
---
 test/emacs-attachment-warnings.el | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/test/emacs-attachment-warnings.el b/test/emacs-attachment-warnings.el
index a23692d7..8f4918ef 100644
--- a/test/emacs-attachment-warnings.el
+++ b/test/emacs-attachment-warnings.el
@@ -67,16 +67,15 @@ (defvar attachment-check-tests
 
 (defun notmuch-test-attachment-warning-1 ()
   (let (output expected)
-    (mapcar (lambda (test)
-	      (let* ((expect (car test))
-		     (body (cdr test))
-		     (result (attachment-check-test body)))
-		(push expect expected)
-		(push (if (eq result expect)
-			  result
-			;; In the case of a failure, include the test
-			;; details to make it simpler to debug.
-			(format "%S <-- %S" result body))
-		      output)))
-	    attachment-check-tests)
+    (dolist (test attachment-check-tests)
+      (let* ((expect (car test))
+	     (body (cdr test))
+	     (result (attachment-check-test body)))
+	(push expect expected)
+	(push (if (eq result expect)
+		  result
+		;; In the case of a failure, include the test
+		;; details to make it simpler to debug.
+		(format "%S <-- %S" result body))
+	      output)))
     (notmuch-test-expect-equal output expected)))
-- 
2.26.0

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: