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

ci: fix clippy findings, update cargo-check-external-types toolchain #73

Merged
merged 5 commits into from
Aug 1, 2024

Conversation

cpu
Copy link
Contributor

@cpu cpu commented May 29, 2024

👋 As promised, when cargo-check-external-types makes an update I'm opening PRs to fix the builds :-) This project also had several clippy findings that are fixed along the way.

See commit messages for individual explanations. I think adding a bitvec feature is the correct fix for the unexpected_cfgs finding, but this should be double checked.

cpu added 4 commits May 29, 2024 17:31
Fixes clippy finding of the form:

```
error: unexpected `cfg` condition value: `bitvec`
  --> src/ber/ber.rs:13:7
   |
13 | #[cfg(feature = "bitvec")]
   |       ^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `bigint`, `cookie-factory`, `default`, `num-bigint`, `serialize`, `std`, and `unstable`
   = help: consider adding `bitvec` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `-D unexpected-cfgs` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
```
Fixes a clippy finding of the form:

```
error: doc list item missing indentation
   --> src/lib.rs:109:4
    |
109 | //! for sequences and sets variants
    |    ^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
    = note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
```
Resolves warning of the form:
```
warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
   --> src/lib.rs:237:9
    |
237 | #![deny(broken_intra_doc_links)]
    |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
    |
    = note: `#[warn(renamed_and_removed_lints)]` on by default
```
The upstream project cut a 0.1.12 release that now pins Rust
nightly-2024-05-01. This commit updates CI to match.
@cpu
Copy link
Contributor Author

cpu commented May 29, 2024

I think adding a bitvec feature is the correct fix for the unexpected_cfgs finding, but this should be double checked.

Nope, that's no good. It seems like the code behind the feature gate requires the bitvec crate.

Probably the right fix is to add an optional = true dep for that crate and use the implicit feature it creates. I tried doing that with bitvec 1.x and there's a bunch of build errors. If I had to guess I'd say the code using this dep was written with an older version and the API has shifted. Unfortunately I don't have time to unwind this, maybe a maintainer could pick it up?

Or perhaps it should be removed since it was unused dead code until now?

@chifflier chifflier merged commit 7013d65 into rusticata:master Aug 1, 2024
@chifflier
Copy link
Member

I resolved the problem with the bitvec feature and merged your changes.
Thanks!

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