Skip to content

Commit

Permalink
remove more unnecessary casts and non-null assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 committed May 14, 2024
1 parent 56ffde4 commit 8da04f7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 2.4.2-wip

- Bump the min sdk to 3.4.0.
- Remove some unnecessary casts now that we have private field promotion.
- Remove some unnecessary casts and non-null assertions now that we have private
field promotion.

## 2.4.1

Expand Down
2 changes: 2 additions & 0 deletions build_runner_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## 7.3.1-wip

- Bump the min sdk to 3.4.0.
- Remove some unnecessary casts and non-null assertions now that we have private
field promotion.

## 7.3.0

Expand Down
2 changes: 1 addition & 1 deletion build_runner_core/lib/src/asset/reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class SingleStepReader implements AssetReader {
}
var streamCompleter = StreamCompleter<AssetId>();

doAfter(_getGlobNode!(glob, _primaryPackage, _phaseNumber),
doAfter(_getGlobNode(glob, _primaryPackage, _phaseNumber),
(GlobAssetNode globNode) {
assetsRead.add(globNode.id);
streamCompleter.setSourceStream(Stream.fromIterable(globNode.results!));
Expand Down
4 changes: 2 additions & 2 deletions build_runner_core/lib/src/generate/build_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class _SingleBuild {
var invalidated = await _assetGraph.updateAndInvalidate(
_buildPhases, updates, _packageGraph.root.name, _delete, _reader);
if (_reader is CachingAssetReader) {
(_reader as CachingAssetReader).invalidate(invalidated);
_reader.invalidate(invalidated);
}
});
}
Expand Down Expand Up @@ -306,7 +306,7 @@ class _SingleBuild {
assert(result.performance != null);
var now = DateTime.now();
var logPath = p.join(
_logPerformanceDir!,
_logPerformanceDir,
'${now.year}-${_twoDigits(now.month)}-${_twoDigits(now.day)}'
'_${_twoDigits(now.hour)}-${_twoDigits(now.minute)}-'
'${_twoDigits(now.second)}');
Expand Down

0 comments on commit 8da04f7

Please sign in to comment.