[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors and spy-calls-count-returned |
Date: |
Thu, 16 Dec 2021 14:59:40 -0500 (EST) |
branch: elpa/buttercup
commit 8d918933e7997e779a967820f5b158c27b376fc7
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Optimize spy-calls-count-errors and spy-calls-count-returned
Use cl-count-if instead.
---
buttercup.el | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index c3465ab..5fc7523 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1231,13 +1231,11 @@ responsibility to ensure ARG is a command."
(defun spy-calls-count-returned (spy)
"Return the number of times SPY has been called successfully so far."
- (length (cl-remove-if-not 'spy-context-return-p
- (spy-calls-all spy))))
+ (cl-count-if 'spy-context-return-p (spy-calls-all spy)))
(defun spy-calls-count-errors (spy)
"Return the number of times SPY has been called and thrown errors so far."
- (length (cl-remove-if-not 'spy-context-thrown-p
- (spy-calls-all spy))))
+ (cl-count-if 'spy-context-thrown-p (spy-calls-all spy)))
(defun spy-calls-args-for (spy index)
"Return the context of the INDEXth call to SPY."
- [nongnu] elpa/buttercup 897d0e7 155/340: Remove some warnings on test-buttercup.el, (continued)
- [nongnu] elpa/buttercup 897d0e7 155/340: Remove some warnings on test-buttercup.el, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 25046d3 160/340: Rewrite buttercup--update-with-funcall with suite-or-spec functions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 85aebcd 168/340: Fix issue #121, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4089d5f 194/340: Bump version: 1.14 → 1.15, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1850253 195/340: Remove duplicate buttercup-color declaration, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2bc55fe 201/340: Add emacs-26.2 to CI config, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup debe7cc 204/340: Merge pull request #144 from kevinjfoley/support-var-star, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c2d75e9 209/340: Bump version: 1.17 → 1.18, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bb3fba3 227/340: Properly handle return values and thrown signals in spies, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a970d10 228/340: Implement spy-calls-count-returned and spy-calls-count-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors and spy-calls-count-returned,
ELPA Syncer <=
- [nongnu] elpa/buttercup 83141f7 243/340: Raise an error if spy-on is used in the wrong context, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 16e3530 090/340: Also update Makefile to the new docs names, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 794afbf 114/340: Merge pull request #65 from DamienCassou/patch-1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d5c9a19 120/340: Make --with-cleanup public so spies can be used without specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 79286cf 055/340: Test for the batch reporter., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 87e0c0d 073/340: Bump version: 1.0 → 1.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 10e0537 150/340: Manually fix bumpversion.cfg, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 18a8879 151/340: Bump version: 1.8 → 1.9, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 62c416a 164/340: Rewrite the pattern loop of buttercup-run-discover, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 636db47 172/340: Typo fixes (#126), ELPA Syncer, 2021/12/16