Skip to content

mmc: Replace .chunks_exact() with .as_chunks() to fix clippy lint - #45

Merged
rocky merged 1 commit into
mainfrom
fix-clippy-lint
Sep 2, 2026
Merged

mmc: Replace .chunks_exact() with .as_chunks() to fix clippy lint#45
rocky merged 1 commit into
mainfrom
fix-clippy-lint

Conversation

@skr4n

@skr4n skr4n commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

The latest version of Rust, released just a few days ago introduced a new lint that CI. This PR fixes it.

@rocky

rocky commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

LGTM - but we should probably bump the version number in Cargo.toml from 0.1.0 to something greater than that and add some sort of dev tag, e.g. 0.1.1dev0, or something like that.

@skr4n

skr4n commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM - but we should probably bump the version number in Cargo.toml from 0.1.0 to something greater than that and add some sort of dev tag, e.g. 0.1.1dev0, or something like that.

I'd rather avoid the noise with having to do this, given that the Rust tooling does a good job of letting you know about the source of a dependency.

@rocky

rocky commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

LGTM - but we should probably bump the version number in Cargo.toml from 0.1.0 to something greater than that and add some sort of dev tag, e.g., 0.1.1dev0, or something like that.

I'd rather avoid the noise of having to do this, given that the Rust tooling does a good job of letting you know about the source of a dependency.

I am not sure I understand. There is a version number. 0.1.0 that was released. This is a change to the code, so it is different from version 0.1.0.

If you feel that adding "dev0" is "noise" and want to just call this version 0.1.1 instead, okay. People using or developing the library will track whether 0.1.1 has been released or not.

There is this style of making users/developers figure things out. That seems to be your style. So be it.

@skr4n

skr4n commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

I am not sure I understand. There is a version number. 0.1.0 that was released. This is a change to the code, so it is different from version 0.1.0.

Yes, but these are unpublished changes that are not slated for general use.
Versions only matter for published changes, which can also include nightlies, pre-releases or release candidates (which we do not do).
General users obtain the crate from a published release.

If you feel that adding "dev0" is "noise" and want to just call this version 0.1.1 instead, okay. People using or developing the library will track whether 0.1.1 has been released or not.

0.1.1 and 0.2.0 are ones used for indicating releases that are complete and are not better than using -dev from your prior suggestion.

Moreover, we cannot predict whether our next release would be a breaking one. Bumping the version number before the change would be confusing.

Users looking to track releases have the github releases page, the crates.io page and the changelog file.

There is this style of making users/developers figure things out. That seems to be your style. So be it.

One would opt for a non-published version only for a specific feature that's yet to end up in a release (like we did with libcdio-sys). And to do so, they would most likely obtain it from git.
Looking at the cargo documentation for obtaining a dependency from git, the primary identifier is a commit hash or a git tag rather than the version string, which is precise and would be more helpful in a bug report.

This (bumping the version only before release) is something that all major Rust crates do, without any complaints from users.

The point is, Rust has established tooling and conventions that handle such trivial things for us, which I follow in this crate.

You must be coming from the standpoint of a C project, where things depend a lot on the build system used and the developer's own conventions.

@rocky

rocky commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The point is, Rust has established tooling and conventions that handle such trivial things for us, which I follow in this crate.

You must be coming from the standpoint of a C project, where things depend a lot on the build system used and the developer's own conventions.

You are correct, and I stand corrected. Thanks for the information.

@rocky
rocky merged commit cd67f58 into main Sep 2, 2026
5 checks passed
@rocky
rocky deleted the fix-clippy-lint branch September 2, 2026 11:48
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