Skip to content

Commit

Permalink
don't use push, like ever
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf authored and petkaantonov committed May 5, 2014
1 parent cf2f47a commit 2086a61
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions benchmark/lib/fakesP.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ else if(global.useLie) {
args[i] = arguments[i];
}
return new Lie(function(resolve, reject) {
var callback = function(err, val) {
args[args.length++] = function(err, val) {
if (err) reject(err);
else resolve(val);
};
args.push(callback);
nodefn.apply(self, args);
});
};
Expand Down Expand Up @@ -74,11 +73,10 @@ else if (global.useNative) {
args[i] = arguments[i];
}
return new Promise(function(resolve, reject) {
var callback = function(err, val) {
args[args.length++] = function(err, val) {
if (err) reject(err);
else resolve(val);
};
args.push(callback);
nodefn.apply(self, args);
});
};
Expand Down

0 comments on commit 2086a61

Please sign in to comment.