Skip to content

HermitVersion: Added new fn#93

Merged
mkroening merged 1 commit into
mainfrom
entry-fmt
Jun 8, 2026
Merged

HermitVersion: Added new fn#93
mkroening merged 1 commit into
mainfrom
entry-fmt

Conversation

@jounathaen

Copy link
Copy Markdown
Member

The sole purpose of this function is to remove the four extra lines of code when instantiating this struct.

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've not done it this way deliberately, because without inline hints, I find

HermitVersion::new(0, 1, 2)

less readable than

HermitVersion {
    major: 0,
    minor: 1,
    patch: 2,
}

Compare to the main usage of the semver crate (and tests).

Adding this is fine with me. This is similar to semver::Version::new, though that method functions to avoid spelling out pre and build.

I am unsure if changing the tests is the right call, but you can do as you wish. :)

@jounathaen

Copy link
Copy Markdown
Member Author

Then let's merge it. It isn't a big thing but doesn't hurt.

@mkroening mkroening added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 0b6b0e7 Jun 8, 2026
12 checks passed
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