Skip to content
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

feat: specify msrv #95

Merged
merged 7 commits into from
Jan 10, 2025
Merged

feat: specify msrv #95

merged 7 commits into from
Jan 10, 2025

Conversation

rinde
Copy link
Contributor

@rinde rinde commented Jan 10, 2025

With the stabilization of the minimum supported Rust version (MSRV) aware resolver it becomes more relevant to specify the MSRV of tinytime. I used cargo-msrv to determine the number. I think that the version number is relatively recent because we use the expect annotation which was only stabilized in version 1.81.0.

closes #6

Copy link
Contributor

@fabian-braun fabian-braun 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, if we specify a MSRV we should also have automated tests to check that the crate compiles with that version. WDYT?

@rinde
Copy link
Contributor Author

rinde commented Jan 10, 2025

@fabian-braun I think this is done automatically. If you specify a lower version, linting will fail on the specific functionality that doesn't work at that version. I think this is possible because the standard lib has every method annotated, e.g. #[stable(feature = "vec_resize_with", since = "1.33.0")]

@rinde
Copy link
Contributor Author

rinde commented Jan 10, 2025

@fabian-braun I think lint doesn't always pick it up so I also added a msrv-check

@rinde rinde requested a review from fabian-braun January 10, 2025 16:11
Copy link
Contributor

@fabian-braun fabian-braun left a comment

Choose a reason for hiding this comment

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

Nice, I knew that other projects have a MSRV check in CI, so I was surprised that there's a lint for it. Maybe the check is also advisable when you depend on other third-party crates.

@fabian-braun fabian-braun merged commit dbc58de into main Jan 10, 2025
3 checks passed
@fabian-braun fabian-braun deleted the specify-msrv branch January 10, 2025 16:25
@github-actions github-actions bot mentioned this pull request Jan 10, 2025
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.

Specify MSRV (minimum supported rust version)
2 participants