-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: enforce clippy::allow_attributes for common crates #18988
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
Changes from all commits
25f5bbb
c87cb32
42e1cfc
3058379
8728714
3e92d01
6982ffd
08fc668
9ad4fe0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,12 +157,10 @@ macro_rules! config_namespace { | |
| // $(#[allow(deprecated)])? | ||
| { | ||
| $(let value = $transform(value);)? // Apply transformation if specified | ||
| #[allow(deprecated)] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I wonder if there was a historical reason these allow deprecations were present; was it anticipating future compatibility? 🤔
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it may have been needed for code that was subsequently updated but the |
||
| let ret = self.$field_name.set(rem, value.as_ref()); | ||
|
|
||
| $(if !$warn.is_empty() { | ||
| let default: $field_type = $default; | ||
| #[allow(deprecated)] | ||
| if default != self.$field_name { | ||
| log::warn!($warn); | ||
| } | ||
|
|
@@ -181,7 +179,6 @@ macro_rules! config_namespace { | |
| $( | ||
| let key = format!(concat!("{}.", stringify!($field_name)), key_prefix); | ||
| let desc = concat!($($d),*).trim(); | ||
| #[allow(deprecated)] | ||
| self.$field_name.visit(v, key.as_str(), desc); | ||
| )* | ||
| } | ||
|
|
@@ -191,8 +188,7 @@ macro_rules! config_namespace { | |
| match key { | ||
| $( | ||
| stringify!($field_name) => { | ||
| #[allow(deprecated)] | ||
| { | ||
| { | ||
| if rem.is_empty() { | ||
| let default_value: $field_type = $default; | ||
| self.$field_name = default_value; | ||
|
|
@@ -213,7 +209,6 @@ macro_rules! config_namespace { | |
| } | ||
| impl Default for $struct_name { | ||
| fn default() -> Self { | ||
| #[allow(deprecated)] | ||
| Self { | ||
| $($field_name: $default),* | ||
| } | ||
|
|
@@ -1851,8 +1846,7 @@ macro_rules! extensions_options { | |
| // Safely apply deprecated attribute if present | ||
| // $(#[allow(deprecated)])? | ||
| { | ||
| #[allow(deprecated)] | ||
| self.$field_name.set(rem, value.as_ref()) | ||
| self.$field_name.set(rem, value.as_ref()) | ||
| } | ||
| }, | ||
| )* | ||
|
|
@@ -1866,7 +1860,6 @@ macro_rules! extensions_options { | |
| $( | ||
| let key = stringify!($field_name).to_string(); | ||
| let desc = concat!($($d),*).trim(); | ||
| #[allow(deprecated)] | ||
| self.$field_name.visit(v, key.as_str(), desc); | ||
| )* | ||
| } | ||
|
|
@@ -2309,7 +2302,6 @@ macro_rules! config_namespace_with_hashmap { | |
| $( | ||
| stringify!($field_name) => { | ||
| // Handle deprecated fields | ||
| #[allow(deprecated)] // Allow deprecated fields | ||
| $(let value = $transform(value);)? | ||
| self.$field_name.set(rem, value.as_ref()) | ||
| }, | ||
|
|
@@ -2325,15 +2317,13 @@ macro_rules! config_namespace_with_hashmap { | |
| let key = format!(concat!("{}.", stringify!($field_name)), key_prefix); | ||
| let desc = concat!($($d),*).trim(); | ||
| // Handle deprecated fields | ||
| #[allow(deprecated)] | ||
| self.$field_name.visit(v, key.as_str(), desc); | ||
| )* | ||
| } | ||
| } | ||
|
|
||
| impl Default for $struct_name { | ||
| fn default() -> Self { | ||
| #[allow(deprecated)] | ||
| Self { | ||
| $($field_name: $default),* | ||
| } | ||
|
|
@@ -2361,7 +2351,6 @@ macro_rules! config_namespace_with_hashmap { | |
| $( | ||
| let key = format!("{}.{field}::{}", key_prefix, column_name, field = stringify!($field_name)); | ||
| let desc = concat!($($d),*).trim(); | ||
| #[allow(deprecated)] | ||
| col_options.$field_name.visit(v, key.as_str(), desc); | ||
| )* | ||
| } | ||
|
|
@@ -2940,7 +2929,7 @@ config_namespace! { | |
| pub trait OutputFormatExt: Display {} | ||
|
|
||
| #[derive(Debug, Clone, PartialEq)] | ||
| #[allow(clippy::large_enum_variant)] | ||
| #[cfg_attr(feature = "parquet", expect(clippy::large_enum_variant))] | ||
| pub enum OutputFormat { | ||
| CSV(CsvOptions), | ||
| JSON(JsonOptions), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️