1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 16:52:25 +01:00

remove redundant throwing of StopIteration from generators

This commit is contained in:
Doug Kearns
2008-09-15 14:52:21 +00:00
parent b0dede3cba
commit a0cbde84b1
4 changed files with 0 additions and 6 deletions

View File

@@ -188,8 +188,6 @@ liberator.Commands = function () //{{{
var sorted = exCommands.sort(function (cmd1, cmd2) { return cmd1.name > cmd2.name; }); var sorted = exCommands.sort(function (cmd1, cmd2) { return cmd1.name > cmd2.name; });
for (var i = 0; i < sorted.length; i++) for (var i = 0; i < sorted.length; i++)
yield sorted[i]; yield sorted[i];
throw StopIteration;
}, },
add: function (names, description, action, extra) add: function (names, description, action, extra)

View File

@@ -39,7 +39,6 @@ liberator.AutoCommands = function () //{{{
for (var item in autoCommands) for (var item in autoCommands)
for (var i = 0; i < autoCommands[item].length; i++) for (var i = 0; i < autoCommands[item].length; i++)
yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1]; yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1];
throw StopIteration;
} }
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}

View File

@@ -160,7 +160,6 @@ liberator.Mappings = function () //{{{
if (output) if (output)
yield maps[i]; yield maps[i];
} }
throw StopIteration;
} }
function addMapCommands(ch, modes, modeDescription) function addMapCommands(ch, modes, modeDescription)

View File

@@ -189,8 +189,6 @@ liberator.modes = (function () //{{{
for (var i = 0; i < modes.length; i++) for (var i = 0; i < modes.length; i++)
yield modes[i]; yield modes[i];
throw StopIteration;
}, },
get all() { return [this.NONE, this.NORMAL, this.INSERT, this.VISUAL, get all() { return [this.NONE, this.NORMAL, this.INSERT, this.VISUAL,