Decaf cleanup: remove Array.from()

This commit is contained in:
Eric Mc Sween 2020-09-11 14:40:01 -04:00
parent 971a768c4e
commit 6c020f6e54

View file

@ -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()
}
}
}