Skip to content

Fix clippy complaints #1506

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
May 19, 2025
Merged

Fix clippy complaints #1506

merged 1 commit into from
May 19, 2025

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Apr 7, 2025

Fixes a few clippy warnings.

doc(cfg(..)

Currently, https://docs.rs/nalgebra/latest/nalgebra/base/par_iter/struct.ParColumnIter.html doesn't warn that the feature rayon should be activated, well it's written in comments, but it should be covered by the line:

#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]

But it is not, because doc_cfg is a feature, so it should be written: #[cfg_attr(feature = "doc_cfg", doc(cfg(feature = "rayon")))].

BUT now rust requires all features to be listed in Cargo.toml, or it will complain about "unexpected cfg", I think it makes little sense to go through an intermediate feature, which would add noise to existing feature list, so I just replaced it by docsrs compile flag, which works as showcased:

Screenshot from 2025-04-07 15-07-33

Note

@Ralith Ralith merged commit 0e6b1d1 into dimforge:main May 19, 2025
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