Skip to content

Make ColorSpace marker types non-instantiable#215

Open
leonardohn wants to merge 1 commit into
linebender:mainfrom
leonardohn:main
Open

Make ColorSpace marker types non-instantiable#215
leonardohn wants to merge 1 commit into
linebender:mainfrom
leonardohn:main

Conversation

@leonardohn

Copy link
Copy Markdown

The ColorSpace trait is supposed to be implemented by marker types that exist only at the type level, i.e., let _ = Srgb; has no meaningful use and should not be allowed by the compiler. This commit modifies all types that implement ColorSpace to use empty enums instead, so they cannot be instantiated.

The ColorSpace trait is supposed to be implemented by marker types that
exist only at the type level, i.e., `let _ = Srgb;` has no meaningful
use and should not be allowed by the compiler. This commit modifies all
types that implement ColorSpace to use empty enums instead, so they
cannot be instantiated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant