DSC
DSC copied to clipboard
Refactor code for ConfigSubCommands
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest version
- [X] Search the existing issues.
Steps to reproduce
3 subcomands ConfigSubCommand::Get/Set/Test use copies of mostly the same code; this should be refactored to reuse same piece of code.
This was brought up in PR review #82 .
Expected behavior
N/A
Actual behavior
N/A
Error details
No response
Environment data
N/A
Version
N/A
Visuals
No response
I think a viable way to resolve this in general beyond just the 3 cases is for any struct that is intended to be rendered as JSON, we define a to_json trait that is implemented by each struct.