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

Unified Diff: test/codegen/expect/collection/src/canonicalized_map.js

Issue 1524843002: JS: Format if statements with no else on a single line (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 5 years 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 | « test/codegen/expect/collection/priority_queue.js ('k') | test/codegen/expect/collection/src/comparators.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/collection/src/canonicalized_map.js
diff --git a/test/codegen/expect/collection/src/canonicalized_map.js b/test/codegen/expect/collection/src/canonicalized_map.js
index deeb502ca04a63fdc3cebf565470ba174e529003..1150fd9ea84d54f507485546c64e7377cec00f0d 100644
--- a/test/codegen/expect/collection/src/canonicalized_map.js
+++ b/test/codegen/expect/collection/src/canonicalized_map.js
@@ -27,8 +27,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
this.addAll(other);
}
get(key) {
- if (!dart.notNull(this[_isValidKey](key)))
- return null;
+ if (!dart.notNull(this[_isValidKey](key))) return null;
let pair = this[_base].get(dart.dcall(this[_canonicalize], key));
return pair == null ? null : pair.last;
}
@@ -46,8 +45,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
this[_base].clear();
}
containsKey(key) {
- if (!dart.notNull(this[_isValidKey](key)))
- return false;
+ if (!dart.notNull(this[_isValidKey](key))) return false;
return this[_base].containsKey(dart.dcall(this[_canonicalize], key));
}
containsValue(value) {
@@ -75,8 +73,7 @@ dart_library.library('collection/src/canonicalized_map', null, /* Imports */[
return this[_base].putIfAbsent(dart.as(dart.dcall(this[_canonicalize], key), C), dart.fn(() => new (utils.Pair$(K, V))(key, ifAbsent()), utils.Pair$(K, V), [])).last;
}
remove(key) {
- if (!dart.notNull(this[_isValidKey](key)))
- return null;
+ if (!dart.notNull(this[_isValidKey](key))) return null;
let pair = this[_base].remove(dart.dcall(this[_canonicalize], key));
return pair == null ? null : pair.last;
}
« no previous file with comments | « test/codegen/expect/collection/priority_queue.js ('k') | test/codegen/expect/collection/src/comparators.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698