Centralize lint configuration (#3055)

This commit is contained in:
Jonas Platte
2024-11-30 16:53:48 +01:00
committed by GitHub
parent 2eaed0badc
commit d84136e1e4
19 changed files with 66 additions and 161 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ use syn::{
};
pub(crate) fn parse_parenthesized_attribute<K, T>(
input: ParseStream,
input: ParseStream<'_>,
out: &mut Option<(K, T)>,
) -> syn::Result<()>
where
@@ -30,7 +30,7 @@ where
}
pub(crate) fn parse_assignment_attribute<K, T>(
input: ParseStream,
input: ParseStream<'_>,
out: &mut Option<(K, T)>,
) -> syn::Result<()>
where
+1 -1
View File
@@ -16,7 +16,7 @@ pub(crate) fn expand(_attr: Attrs, mut item_fn: ItemFn) -> TokenStream {
pub(crate) struct Attrs;
impl Parse for Attrs {
fn parse(_input: syn::parse::ParseStream) -> syn::Result<Self> {
fn parse(_input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
Ok(Self)
}
}
+1 -1
View File
@@ -122,7 +122,7 @@ pub(crate) struct Attrs {
}
impl Parse for Attrs {
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let mut state_ty = None;
while !input.is_empty() {
+1 -1
View File
@@ -73,7 +73,7 @@ pub(super) struct FieldAttrs {
}
impl Parse for FieldAttrs {
fn parse(input: ParseStream) -> syn::Result<Self> {
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
let mut skip = None;
while !input.is_empty() {
+2 -2
View File
@@ -18,7 +18,7 @@ pub(super) struct FromRequestContainerAttrs {
}
impl Parse for FromRequestContainerAttrs {
fn parse(input: ParseStream) -> syn::Result<Self> {
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
let mut via = None;
let mut rejection = None;
let mut state = None;
@@ -66,7 +66,7 @@ pub(super) struct FromRequestFieldAttrs {
}
impl Parse for FromRequestFieldAttrs {
fn parse(input: ParseStream) -> syn::Result<Self> {
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
let mut via = None;
while !input.is_empty() {
-37
View File
@@ -2,43 +2,6 @@
//!
//! [`axum`]: https://crates.io/crates/axum
#![warn(
clippy::all,
clippy::dbg_macro,
clippy::todo,
clippy::empty_enum,
clippy::enum_glob_use,
clippy::mem_forget,
clippy::unused_self,
clippy::filter_map_next,
clippy::needless_continue,
clippy::needless_borrow,
clippy::match_wildcard_for_single_variants,
clippy::if_let_mutex,
clippy::await_holding_lock,
clippy::match_on_vec_items,
clippy::imprecise_flops,
clippy::suboptimal_flops,
clippy::lossy_float_literal,
clippy::rest_pat_in_fully_bound_structs,
clippy::fn_params_excessive_bools,
clippy::exit,
clippy::inefficient_to_string,
clippy::linkedlist,
clippy::macro_use_imports,
clippy::option_option,
clippy::verbose_file_reads,
clippy::unnested_or_patterns,
clippy::str_to_string,
rust_2018_idioms,
future_incompatible,
nonstandard_style,
missing_debug_implementations,
missing_docs
)]
#![deny(unreachable_pub)]
#![allow(elided_lifetimes_in_paths, clippy::type_complexity)]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(test, allow(clippy::float_cmp))]
#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]
+1 -1
View File
@@ -55,7 +55,7 @@ struct Attrs {
}
impl Parse for Attrs {
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let mut path = None;
let mut rejection = None;