diff --git a/packages/constraint-solver/constraints-list.js b/packages/constraint-solver/constraints-list.js index ba2edf4616..ef62f114be 100644 --- a/packages/constraint-solver/constraints-list.js +++ b/packages/constraint-solver/constraints-list.js @@ -6,8 +6,7 @@ var semver = Npm.require('semver'); // A persistent data-structure that keeps references to Constraint objects // arranged by the "name" field of Constraint, exact field and version. // -// Internal structure has the "length" field for the number of elements stored -// and the "byName" map that has the following structure: +// Internal structure has the "byName" map that has the following structure: // byName: // - nameOfPackage: // - exact: @@ -19,10 +18,8 @@ ConstraintSolver.ConstraintsList = function (prev) { if (prev) { self.byName = prev.byName; - self.length = prev.length; } else { self.byName = mori.hash_map(); - self.length = 0; } }; @@ -69,8 +66,6 @@ ConstraintSolver.ConstraintsList.prototype.push = function (c) { newList.byName = mori.assoc(newList.byName, c.name, bn); } - newList.length++; - return newList; };