Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: lib/src/line_splitting/rule_set.dart

Issue 1418483008: Optimize splitting lines with many rules. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/line_splitting/rule_set.dart
diff --git a/lib/src/line_splitting/rule_set.dart b/lib/src/line_splitting/rule_set.dart
index 709b3739e671db0c1e2188e14ddd551ca5e82eb7..e0cf3e181c82fbe19783747dcba87cfefeafaa73 100644
--- a/lib/src/line_splitting/rule_set.dart
+++ b/lib/src/line_splitting/rule_set.dart
@@ -59,9 +59,7 @@ class RuleSet {
_values[rule.index] = value;
// Test this rule against the other rules being bound.
- for (var other in rules) {
- if (rule == other) continue;
-
+ for (var other in rule.constrainedRules) {
var otherValue = _values[other.index];
var constraint = rule.constrain(value, other);

Powered by Google App Engine
This is Rietveld 408576698