Add a strict clippy config
I maintainer di solito rispondono entro 2 giorni
@seanmonstar ci sta già lavorando.
Dal 19/5/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
hyper for a long time never bothered with clippy. Mostly for historical reasons and opinions.
I've now come around to just turning clippy up to 11. What I'm currently leaning towards is keeping an allowlist, and otherwise denying pedantic and even restriction lints. Yes, I know there's a restriction lint against linting for the restriction group. An allowlist still makes a lot of sense to me. If after a bit it turns out to be just unbearable, we can convert it to a bigger deny list, I guess.
The initial config is in place, with a CI job that enforce it, so we won't regress with new code. Now, we just need to evaluate all the undecided lints, and either choose to allow them for sure, or fix them.
How to help
Look at the list of lints that need to be decided upon in the Cargo.toml (it's around there, the line might move slightly).
- Pick a lint.
- If it seems obviously an improvement:
- Fix up the code from the lint.
- It might be as simple as
cargo clippy --fix --features full. - It might be obvious enough for an LLM to automate fixing. (But only if you understand what changes it made.)
- It might need manual adjustment in each case.
- It might need to be
#[allow(this_lint)]in specific cases, where the lint is usually useful.
- It might be as simple as
- Remove the allowed lint from the
Cargo.toml - Submit a PR for one lint at a time.
- Fix up the code from the lint.
- If it is not obviously an improvement:
- Move the lint down lower to the explicitly allowed list in the
Cargo.toml - Add a comment why the lint is being allowed
- Submit a PR (multiple lints solved this way is fine in a single PR)
- Move the lint down lower to the explicitly allowed list in the
Steps
- #4075
- address each one in in the todo list
- arithmetic_side_effects = "allow" # TODO: consider
- as_conversions = "allow" # TODO: tricky
- borrow_as_ptr = "allow"
- cast_lossless = "allow" # TODO: easy fix
- cast_possible_truncation = "allow" # TODO: consider
- cast_precision_loss = "allow" # TODO: consider
- checked_conversions = "allow"
- collapsible_match = "allow"
- decimal_literal_representation = "allow" # TODO: consider
- default_trait_access = "allow"
- else_if_without_else = "allow"
- empty_structs_with_brackets = "allow" # TODO: easy fix
- enum_glob_use = "allow"
- explicit_iter_loop = "allow" # TODO: easy fix
- float_arithmetic = "allow"
- ignored_unit_patterns = "allow"
- indexing_slicing = "allow"
- integer_division = "allow"
- integer_division_remainder_used = "allow"
- large_enum_variant = "allow"
- let_unit_value = "allow"
- manual_assert = "allow" # TODO: easy fix
- manual_assert_eq = "allow" # TODO: easy fix
- map_err_ignore = "allow"
- map_unwrap_or = "allow"
- match_wild_err_arm = "allow"
- missing_fields_in_debug = "allow" # TODO: use finish_non_exhaustive
- missing_errors_doc = "allow" # TODO: good to fix
- missing_panics_doc = "allow" # TODO: might be false
- multiple_inherent_impl = "allow"
- multiple_unsafe_ops_per_block = "allow"
- needless_continue = "allow"
- needless_pass_by_value = "allow"
- panic = "allow"
- pattern_type_mismatch = "allow"
- ptr_as_ptr = "allow"
- question_mark = "allow" # TODO: probably easy fix
- redundant_closure_for_method_calls = "allow"
- redundant_else = "allow"
- ref_option = "allow"
- ref_patterns = "allow" # TODO: perhaps deny?
- semicolon_if_nothing_returned = "allow" # TODO: easy fix
- single_char_lifetime_names = "allow"
- single_match_else = "allow" # TODO: easy fix
- struct_excessive_bools = "allow" # TODO: bogus lint?
- trivially_copy_pass_by_ref = "allow"
- undocumented_unsafe_blocks = "allow" # TODO: fix me
- uninlined_format_args = "allow" # TODO: easy fix
- unnecessary_semicolon = "allow" # TODO: easy fix
- unnecessary_trailing_comma = "allow"
- unnested_or_patterns = "allow"
- unused_async = "allow" # TODO: is it for API?
- unused_trait_names = "allow" # TODO: kinda annoying, but might be good to deny
- unwrap_in_result = "allow"
- useless_borrows_in_formatting = "allow"
- wildcard_enum_match_arm = "allow"
- wildcard_imports = "allow" # TODO: never, except for tests
- Lingua principale
- Rust
- Stelle
- 16.4k
- Fork
- 1.8k
- Merge medio
- 5g 17m
- PR unite (30g)
- 19
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperium/hyper
-
C-feature
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
hyperium/hyper#2652 · 4 reazioni ·
I maintainer di solito rispondono entro 2 giorni
-
Write a HIP for `Body::poll_progress()`Forse già presa @cratelyn l’ha presa 5 giorni fa. ApertaA-body B-rfc C-feature
hyperium/hyper#4228 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
hyperium/hyper#4211 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Upgraded HTTP/2 CONNECT streams cannot be reset, so a failed tunnel looks like a clean closeForse già presa @jeremyjpj0916 l’ha presa 15 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 2 giorni
-
Allow connection pools to stop reusing an HTTP/2 connection before its keep-alive timeoutForse già presa @jiahaoliang l’ha presa 33 giorni fa. ApertaC-feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
hyperium/hyper#4186 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di hyperium/hyper
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
RustCrypto/SSH#596 ·
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
neondatabase/neon#12965 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
goauthentik/authentik#26867 ·
I maintainer di solito rispondono entro 1 giorno
-
api bug macos maintainer-needed p2 triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100