I saw that overall project uses var instead of let but in my opinion at least errors should be fully immutable because I do not see any scenario where you should mutate and error (so as there were no error mutations in the project).
Change String(data:encoding:) to String(decoding:as:). It's better to provide info with � symbols if not UTF8 rather than an empty string.
use RawValue in errors instead of actual RawValue type (e.g. instead on Int use Struct.RawValue). Easier to refactor code
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation comments
Description
let
tovar
in errorsvar
instead oflet
but in my opinion at least errors should be fully immutable because I do not see any scenario where you should mutate and error (so as there were no error mutations in the project).String(data:encoding:)
toString(decoding:as:)
. It's better to provide info with � symbols if not UTF8 rather than an empty string.Int
useStruct.RawValue
). Easier to refactor codeType of change
Please delete options that are not relevant.
Checklist: