-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
refactorRefactoring/improving existing codeRefactoring/improving existing code
Description
-
SuperEncoder's conformance toSingleValueEncodingContainerlooks a lot like_Encoder's (and similarly for the decoders); it would improve readability if a new typeSingleValueContainerWrapperwere created to replace both of these, and complement the keyed and unkeyed container wrappers. -
Implementations of
container(keyedBy:),unkeyedContainer(), andsingleValueContainer(), thenestedversions of those, andsuperEncoder()have a lot of checks in common; the code would be a lot clearer if those were combined. The same applies to the decoder.
Hopefully this reduction in boilerplate will help to make the encoder & decoder implementations slightly more readable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorRefactoring/improving existing codeRefactoring/improving existing code