Skip to content

Commit 899e217

Browse files
committed
Tiny syntax cleanup
1 parent 8bf5d08 commit 899e217

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/src/builder.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ class _Builder extends Builder {
9494

9595
if (!_isStandalone) {
9696
var asset = buildStep.inputId;
97-
var name = nameOfPartial(
98-
library,
99-
asset,
100-
);
97+
var name = nameOfPartial(library, asset);
10198
if (name == null) {
10299
var suggest = suggestLibraryName(asset);
103100
throw new InvalidGenerationSourceError(

lib/src/generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class InvalidGenerationSourceError extends Error {
3737
final String todo;
3838

3939
InvalidGenerationSourceError(this.message, {String todo})
40-
: this.todo = todo == null ? '' : todo;
40+
: this.todo = todo ?? '';
4141

4242
@override
4343
String toString() => message;

0 commit comments

Comments
 (0)