aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-refs.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2023-07-31 11:12:00 +0200
committerJonas Bernoulli <jonas@bernoul.li>2023-07-31 11:12:00 +0200
commite8152c76bf636805c0eb9027083d0ff10d28d1a8 (patch)
tree51964073378f240b9ab7642728e7ac5c9f5a5a51 /lisp/magit-refs.el
parent9f403b68e87982da16253d3308cda194c11133f2 (diff)
Use if-let instead of --if-let
I haven't done a full 180 on anaphoric conditionals; if a builtin equivalent existed, I would use that in some instances. However, having looked at all the existing uses of `if-let', it turns out there are way fewer such cases than I had anticipated.
Diffstat (limited to 'lisp/magit-refs.el')
-rw-r--r--lisp/magit-refs.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 92b6e8e..868e099 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -750,12 +750,12 @@ line is inserted at all."
branch (if head-face (list face head-face) face))))
(defun magit-refs--insert-refname-p (refname)
- (--if-let (seq-find (pcase-lambda (`(,key . ,_))
- (if (functionp key)
- (funcall key refname)
- (string-match-p key refname)))
- magit-refs-filter-alist)
- (cdr it)
+ (if-let ((entry (seq-find (pcase-lambda (`(,key . ,_))
+ (if (functionp key)
+ (funcall key refname)
+ (string-match-p key refname)))
+ magit-refs-filter-alist)))
+ (cdr entry)
t))
(defun magit-refs--insert-cherry-commits (ref)