Skip to content

Commit

Permalink
Remove unnecessary type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
renggli committed Aug 25, 2023
1 parent 47a9a35 commit d9b1133
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/definition/resolve.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Parser<R> _dereference<R>(Parser<R> parser, Map<Parser, Parser> mapping) {
final references = <ResolvableParser<R>>{};
while (parser is ResolvableParser<R>) {
if (mapping.containsKey(parser)) {
return mapping[parser]! as Parser<R>;
return mapping[parser] as Parser<R>;
} else if (!references.add(parser)) {
throw StateError('Recursive references detected: $references');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/reflection/transform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Parser<R> transformParser<R>(Parser<R> parser, TransformationHandler handler) {
}
}
}
return mapping[parser]! as Parser<R>;
return mapping[parser] as Parser<R>;
}

0 comments on commit d9b1133

Please sign in to comment.