Skip to content

Commit

Permalink
refactor: use nonNulls instead of whereNotNull() method
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuit committed Oct 2, 2024
1 parent 7f17cdd commit db5c474
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/scripts_parser/events/execution/command_executed.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:collection/collection.dart';
import 'package:rps/rps.dart';
import 'dart:math' as math;

Expand Down Expand Up @@ -98,9 +97,9 @@ class CommandExecuted extends ExecutionEvent {
return [
filledCommand,
_serializeArguments(arguments.sublist(lastUsed + 1))
].whereNotNull().join(' ');
].nonNulls.join(' ');
} else {
return [command, _serializeArguments(arguments)].whereNotNull().join(' ');
return [command, _serializeArguments(arguments)].nonNulls.join(' ');
}
}

Expand Down

0 comments on commit db5c474

Please sign in to comment.