Skip to content

Inline Version parse* functions when constant #13690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

sabiwara
Copy link
Contributor

Inline cases like Version.parse!("2.0.1") or Version.parse_requirement!("== 2.0.1"), which don't need to be parsed on the fly, very similar to the URI.parse or Duration.new! use cases.

This is a small proposal, I thought it could be nice for code performing comparisons with a fixed version/requirement on the fly.

Copy link
Member

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a no-brainer and a great catch, but I’m not sure if I’m missing some consequence 😄

@sabiwara sabiwara merged commit 8ed692d into elixir-lang:main Jun 25, 2024
9 checks passed
@sabiwara sabiwara deleted the inline-version branch June 25, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants