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

Unified Diff: pkg/compiler/lib/src/util/link.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « pkg/compiler/lib/src/util/indentation.dart ('k') | pkg/compiler/lib/src/util/link_implementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/util/link.dart
diff --git a/pkg/compiler/lib/src/util/link.dart b/pkg/compiler/lib/src/util/link.dart
index f84c2c879243c7d181736467062609d9f5b5e9bd..58d2cb98cf09b71e3abc52de0d149b02ebbaa9cb 100644
--- a/pkg/compiler/lib/src/util/link.dart
+++ b/pkg/compiler/lib/src/util/link.dart
@@ -16,10 +16,9 @@ class Link<T> implements Iterable<T> {
Iterator<T> get iterator => new LinkIterator<T>(this);
- void printOn(StringBuffer buffer, [separatedBy]) {
- }
+ void printOn(StringBuffer buffer, [separatedBy]) {}
- List<T> toList({ bool growable: true }) {
+ List<T> toList({bool growable: true}) {
List<T> result;
if (!growable) {
result = new List<T>(slowLength());
@@ -36,12 +35,12 @@ class Link<T> implements Iterable<T> {
/// Lazily maps over this linked list, returning an [Iterable].
Iterable map(dynamic fn(T item)) {
- return new MappedLinkIterable<T,dynamic>(this, fn);
+ return new MappedLinkIterable<T, dynamic>(this, fn);
}
/// Invokes `fn` for every item in the linked list and returns the results
/// in a [List].
- List mapToList(dynamic fn(T item), { bool growable: true }) {
+ List mapToList(dynamic fn(T item), {bool growable: true}) {
List result;
if (!growable) {
result = new List(slowLength());
@@ -74,7 +73,7 @@ class Link<T> implements Iterable<T> {
void forEach(void f(T element)) {}
bool operator ==(other) {
- if (other is !Link<T>) return false;
+ if (other is! Link<T>) return false;
return other.isEmpty;
}
@@ -113,7 +112,7 @@ class Link<T> implements Iterable<T> {
///
/// Returns true for the empty list.
bool every(bool f(T)) {
- for (Link<T> link = this; !link.isEmpty; link = link.tail){
+ for (Link<T> link = this; !link.isEmpty; link = link.tail) {
if (!f(link.head)) return false;
}
return true;
@@ -125,7 +124,7 @@ class Link<T> implements Iterable<T> {
// Unsupported Iterable<T> methods.
//
bool any(bool f(T e)) => _unsupported('any');
- T elementAt(int i) => _unsupported('elementAt');
+ T elementAt(int i) => _unsupported('elementAt');
Iterable expand(Iterable f(T e)) => _unsupported('expand');
T firstWhere(bool f(T e), {T orElse()}) => _unsupported('firstWhere');
fold(initialValue, combine(value, T element)) => _unsupported('fold');
« no previous file with comments | « pkg/compiler/lib/src/util/indentation.dart ('k') | pkg/compiler/lib/src/util/link_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698