Skip to content

Commit

Permalink
refa: changing clippy allows to expects and adding reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasauler committed Sep 29, 2024
1 parent e7b722f commit f6a5e18
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = 0 }
# unwrap_used = { level = "warn", priority = 1 }

# allow_attributes_without_reason = { level = "warn", priority = 4 } # nightly
allow_attributes = { level = "warn", priority = 4 }
allow_attributes_without_reason = { level = "warn", priority = 4 }
as_underscore = { level = "warn", priority = 4 }
panic_in_result_fn = { level = "warn", priority = 4 }

Expand Down
3 changes: 1 addition & 2 deletions src/client/pluggy/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ pub struct ListAccountsResponse {
pub struct Account {
id: Uuid,
#[serde(rename = "type")]
#[allow(clippy::struct_field_names)]
account_type: AccountType,
acc_type: AccountType,
subtype: AccountSubType,
/// External identifier of the account: agencia/conta
number: String,
Expand Down
3 changes: 1 addition & 2 deletions src/client/pluggy/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ pub struct Transaction {
/// Can be used to identify the category in the Categories endpoint
category_id: Option<String>,
#[serde(rename = "type")]
#[allow(clippy::struct_field_names)]
transaction_type: TransactionType,
tx_type: TransactionType,
/// Balance after the transaction
balance: f32,
/// Institution provided code
Expand Down
2 changes: 1 addition & 1 deletion src/hypermedia/service/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ pub fn signup_tab(secrets: &Secrets) -> impl IntoResponse {
.into_response_with_nonce();
}

#[allow(clippy::too_many_lines)]
#[expect(clippy::too_many_lines, reason = "not yet reviewed this function")]
pub async fn signup(
db_pool: &Pool<Postgres>,
secrets: &Secrets,
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ struct AppState {
}

#[shuttle_runtime::main]
#[allow(clippy::too_many_lines)]
#[expect(
clippy::too_many_lines,
reason = "I have to think on how to shrink it, idk"
)]
/// The main function of the application.
async fn axum(
#[shuttle_runtime::Secrets] secret_store: SecretStore,
Expand Down

0 comments on commit f6a5e18

Please sign in to comment.