[cmd3] Change Command.noRequirements to accept a command implementation (#8783)

This is more ergonomic than `Command.noRequirements().executing(...)`
This commit is contained in:
Sam Carlberg
2026-04-19 18:40:50 -04:00
committed by GitHub
parent 3eaeac6150
commit b7df267687
19 changed files with 121 additions and 172 deletions

View File

@@ -64,8 +64,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
var scopingCommand =
Command.noRequirements()
.executing(
Command.noRequirements(
co -> {
mech.setDefaultCommand(commandScopedCommand);
co.park();
@@ -93,8 +92,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
var scopingCommand =
Command.noRequirements()
.executing(
Command.noRequirements(
co -> {
mech.setDefaultCommand(commandScopedCommand);
co.park();
@@ -126,8 +124,7 @@ class SchedulerDefaultCommandTests extends CommandTestBase {
var commandScopedCommand = mech.run(Coroutine::park).named("Command-Scoped Default Command");
final Command scopingCommand =
Command.noRequirements()
.executing(
Command.noRequirements(
co -> {
mech.setDefaultCommand(commandScopedCommand);
co.park();