From 6c020f6e5453560acfa0e1bf1227a6e050a1544a Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Fri, 11 Sep 2020 14:40:01 -0400 Subject: [PATCH] Decaf cleanup: remove Array.from() --- libraries/metrics/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/metrics/index.js b/libraries/metrics/index.js index 178eb01868..cac34b5021 100644 --- a/libraries/metrics/index.js +++ b/libraries/metrics/index.js @@ -1,6 +1,5 @@ /* * decaffeinate suggestions: - * DS101: Remove unnecessary use of Array.from * DS102: Remove unnecessary code created because of implicit returns * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md @@ -228,6 +227,8 @@ module.exports = Metrics = { timeAsyncMethod: require('./timeAsyncMethod'), close() { - return Array.from(destructors).map(func => func()) + for (const func of destructors) { + func() + } } }