This is a pure refactor - no behaviour changes. (Unless I messed up.)
While working on some reorganisation of the deploy module, I noticed we had some instance methods that didn't use self and in fact seemed more concerned with the CloudClient than with the DeployCommand. For me it felt more readable to pull them out as extension methods on the CloudClientInterface. (My main interest was in moving code out of DeployCommand, which could be done without traitifying. But this felt nicer.)
I also noticed that commands::get_app_id_cloud and DeployCommand::try_get_app_id_cloud did the same thing (modulo one anyhow::Context), so unified them.
I removed the _cloud suffixes which were inherited from earlier Spin code where they had to be distinguished from Platform (_hippo) versions of the operations. The suffix is no longer needed in the cloud-specific plugin. I also took the opportunity to change the argument order and make some strings into &str because reduced the need for repeated cloning.
This is a pure refactor - no behaviour changes. (Unless I messed up.)
While working on some reorganisation of the
deploy
module, I noticed we had some instance methods that didn't useself
and in fact seemed more concerned with theCloudClient
than with theDeployCommand
. For me it felt more readable to pull them out as extension methods on theCloudClientInterface
. (My main interest was in moving code out ofDeployCommand
, which could be done without traitifying. But this felt nicer.)I also noticed that
commands::get_app_id_cloud
andDeployCommand::try_get_app_id_cloud
did the same thing (modulo oneanyhow::Context
), so unified them.I removed the
_cloud
suffixes which were inherited from earlier Spin code where they had to be distinguished from Platform (_hippo
) versions of the operations. The suffix is no longer needed in the cloud-specific plugin. I also took the opportunity to change the argument order and make some strings into&str
because reduced the need for repeated cloning.