Skip to content

media_type!: emit ctor inside const block - #24

Merged
picoHz merged 1 commit into
picoHz:mainfrom
spikespaz-contrib:u/jacob/mediatype-macro-always-const
Oct 28, 2025
Merged

media_type!: emit ctor inside const block#24
picoHz merged 1 commit into
picoHz:mainfrom
spikespaz-contrib:u/jacob/mediatype-macro-always-const

Conversation

@spikespaz

@spikespaz spikespaz commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Cause the media_type! macro to always emit the construction inside a const block.

@spikespaz

Copy link
Copy Markdown
Contributor Author

This is evidently in direct conflict with #11, but I think that's okay. The media_type! macro is mostly useful in cases, for me at least, where const is preferable.

For runtime, I think it's appropriate that consumers call MediaType::from_parts.

@picoHz
picoHz merged commit 212f0c9 into picoHz:main Oct 28, 2025
1 check passed
spikespaz added a commit to spikespaz/progeny that referenced this pull request Oct 28, 2025
My pull request introducing `const` constructor has bee merged:
<picoHz/mediatype#24>
spikespaz added a commit to spikespaz/progeny that referenced this pull request Oct 28, 2025
My pull request for `const` constructor has been merged:
<picoHz/mediatype#24>
spikespaz added a commit to spikespaz/progeny that referenced this pull request Oct 28, 2025
My pull request for `const` constructor has been merged:
<picoHz/mediatype#24>
@spikespaz
spikespaz deleted the u/jacob/mediatype-macro-always-const branch November 22, 2025 04:56
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.

2 participants