Searched our codebase with "&'static str" and replace them with strong type enum.
This PR is addressing the feedback from https://github.com/Azure/GuestProxyAgent/issues/117There are a couple of places where the use of new enums would be more robust, e.g. ModuleState has associated string constants, which doesn't prevent other arbitrary states from being used where a module state is expected, leading to the rather awkward and very fragile need to use a comment! pub status: String, // ModuleState, RUNNING|STOPPED
Searched our codebase with "&'static str" and replace them with strong type enum.
This PR is addressing the feedback from https://github.com/Azure/GuestProxyAgent/issues/117
There are a couple of places where the use of new enums would be more robust, e.g. ModuleState has associated string constants, which doesn't prevent other arbitrary states from being used where a module state is expected, leading to the rather awkward and very fragile need to use a comment! pub status: String, // ModuleState, RUNNING|STOPPED