Skip to content

Commit 974d74a

Browse files
committed
dartfmt
1 parent 964c7fe commit 974d74a

File tree

10 files changed

+254
-213
lines changed

10 files changed

+254
-213
lines changed

lib/src/asset/cache.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ class AssetCache {
4242
class CachedAssetReader extends AssetReader {
4343
final AssetCache _cache;
4444
final AssetReader _reader;
45+
4546
/// Cache of ongoing reads by [AssetId].
4647
final _pendingReads = <AssetId, Future<String>>{};
48+
4749
/// Cache of ongoing hasInput checks by [AssetId].
4850
final _pendingHasInputChecks = <AssetId, Future<bool>>{};
4951

lib/src/asset/id.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class AssetId implements Comparable<AssetId> {
2929
/// The [path] will be normalized: any backslashes will be replaced with
3030
/// forward slashes (regardless of host OS) and "." and ".." will be removed
3131
/// where possible.
32-
AssetId(this.package, String path)
33-
: path = _normalizePath(path);
32+
AssetId(this.package, String path) : path = _normalizePath(path);
3433

3534
/// Parses an [AssetId] string of the form "package|path/to/asset.txt".
3635
///
@@ -49,8 +48,7 @@ class AssetId implements Comparable<AssetId> {
4948
}
5049

5150
if (parts[1].isEmpty) {
52-
throw new FormatException(
53-
'Cannot have empty path in "$description".');
51+
throw new FormatException('Cannot have empty path in "$description".');
5452
}
5553

5654
return new AssetId(parts[0], parts[1]);
@@ -68,9 +66,7 @@ class AssetId implements Comparable<AssetId> {
6866

6967
/// Returns `true` of [other] is an [AssetId] with the same package and path.
7068
operator ==(other) =>
71-
other is AssetId &&
72-
package == other.package &&
73-
path == other.path;
69+
other is AssetId && package == other.package && path == other.path;
7470

7571
int get hashCode => package.hashCode ^ path.hashCode;
7672

lib/src/generate/exceptions.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44
class ConcurrentBuildException implements Exception {
5-
65
const ConcurrentBuildException();
76

87
@override

lib/src/package_graph/package_graph.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ class PackageGraph {
1919

2020
/// Creates a [PackageGraph] given the [root] [PackageNode].
2121
factory PackageGraph.fromRoot(PackageNode root) {
22-
final allPackages = <String, PackageNode>{
23-
root.name: root,
24-
};
22+
final allPackages = <String, PackageNode>{root.name: root};
2523

2624
addDeps(PackageNode package) {
2725
for (var dep in package.dependencies) {
@@ -80,8 +78,8 @@ class PackageGraph {
8078
{bool isRoot: false}) {
8179
var name = yaml['name'];
8280
assert(!nodes.containsKey(name));
83-
var node = new PackageNode(
84-
name, yaml['version'], type, packageLocations[name]);
81+
var node =
82+
new PackageNode(name, yaml['version'], type, packageLocations[name]);
8583
nodes[name] = node;
8684

8785
var deps = _depsFromYaml(yaml, isRoot: isRoot);

0 commit comments

Comments
 (0)