[wip] Payments/subscriptions support #674
clippy
71 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 71 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.0 (051478957 2024-07-21)
- cargo 1.80.0 (376290515 2024-07-16)
- clippy 0.1.80 (0514789 2024-07-21)
Annotations
Check warning on line 21 in src/main.rs
github-actions / clippy
unexpected `cfg` condition name: `tarpaulin_include`
warning: unexpected `cfg` condition name: `tarpaulin_include`
--> src/main.rs:21:11
|
21 | #[cfg(not(tarpaulin_include))]
| ^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin_include)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
Check warning on line 8 in src/util/webhook.rs
github-actions / clippy
importing legacy numeric constants
warning: importing legacy numeric constants
--> src/util/webhook.rs:8:5
|
8 | use std::usize;
| ^^^^^^^^^^
|
= help: remove this import
= note: then `usize::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
Check warning on line 865 in src/routes/internal/billing.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/routes/internal/billing.rs:865:91
|
865 | crate::database::models::user_item::User::clear_caches(&[(user.id.into(), None)], &redis)
| ^^^^^^ help: change this to: `redis`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 862 in src/routes/internal/billing.rs
github-actions / clippy
deref on an immutable reference
warning: deref on an immutable reference
--> src/routes/internal/billing.rs:862:18
|
862 | .execute(&*pool)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `pool`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
Check warning on line 592 in src/routes/internal/billing.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/routes/internal/billing.rs:592:85
|
592 | crate::database::models::user_item::User::get_id(user_id, pool, &redis).await?;
| ^^^^^^ help: change this to: `redis`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 571 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:571:9
|
571 | &*dotenvy::var("STRIPE_WEBHOOK_SECRET")?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dotenvy::var("STRIPE_WEBHOOK_SECRET")?`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 569 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:569:9
|
569 | &*payload,
| ^^^^^^^^^ help: try: `&payload`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 470 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:470:53
|
470 | let customer_id = get_or_create_customer(&user, &*stripe_client, &pool, &redis).await?;
| ^^^^^^^^^^^^^^^ help: try: `&stripe_client`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 350 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:350:50
|
350 | let customer = get_or_create_customer(&user, &*stripe_client, &pool, &redis).await?;
| ^^^^^^^^^^^^^^^ help: try: `&stripe_client`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 293 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:293:50
|
293 | let customer = get_or_create_customer(&user, &*stripe_client, &pool, &redis).await?;
| ^^^^^^^^^^^^^^^ help: try: `&stripe_client`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 239 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:239:50
|
239 | let customer = get_or_create_customer(&user, &*stripe_client, &pool, &redis).await?;
| ^^^^^^^^^^^^^^^ help: try: `&stripe_client`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 176 in src/routes/internal/billing.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> src/routes/internal/billing.rs:176:53
|
176 | let customer_id = get_or_create_customer(&user, &*stripe_client, &pool, &redis).await?;
| ^^^^^^^^^^^^^^^ help: try: `&stripe_client`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
Check warning on line 59 in src/file_hosting/backblaze/authorization.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/file_hosting/backblaze/authorization.rs:59:15
|
59 | .post(&format!("{}/b2api/v2/b2_get_upload_url", authorization_data.api_url).to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/b2api/v2/b2_get_upload_url", authorization_data.api_url).to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 23 in src/routes/v2/reports.rs
github-actions / clippy
fields `report_type`, `item_id`, `item_type`, and `body` are never read
warning: fields `report_type`, `item_id`, `item_type`, and `body` are never read
--> src/routes/v2/reports.rs:23:9
|
22 | pub struct CreateReport {
| ------------ fields in this struct
23 | pub report_type: String,
| ^^^^^^^^^^^
24 | pub item_id: String,
| ^^^^^^^
25 | pub item_type: ItemType,
| ^^^^^^^^^
26 | pub body: String,
| ^^^^
Check warning on line 685 in src/routes/internal/flows.rs
github-actions / clippy
field `bio` is never read
warning: field `bio` is never read
--> src/routes/internal/flows.rs:685:25
|
681 | pub struct GoogleUser {
| ---------- field in this struct
...
685 | pub bio: Option<String>,
| ^^^
|
= note: `GoogleUser` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 294 in src/queue/payouts.rs
github-actions / clippy
fields `description` and `disclosure` are never read
warning: fields `description` and `disclosure` are never read
--> src/queue/payouts.rs:294:21
|
290 | pub struct Product {
| ------- fields in this struct
...
294 | pub description: String,
| ^^^^^^^^^^^
295 | pub disclosure: String,
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 58 in src/validate/resourcepack.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/resourcepack.rs:58:32
|
58 | NaiveDateTime::from_timestamp_opt(1370651522, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 54 in src/validate/resourcepack.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/resourcepack.rs:54:32
|
54 | NaiveDateTime::from_timestamp_opt(1289339999, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 20 in src/validate/resourcepack.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/resourcepack.rs:20:28
|
20 | NaiveDateTime::from_timestamp_opt(1371137542, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 19 in src/validate/quilt.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/quilt.rs:19:28
|
19 | NaiveDateTime::from_timestamp_opt(1646070100, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 63 in src/validate/forge.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/forge.rs:63:32
|
63 | NaiveDateTime::from_timestamp_opt(1540122066, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 59 in src/validate/forge.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/forge.rs:59:32
|
59 | NaiveDateTime::from_timestamp_opt(0, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 20 in src/validate/forge.rs
github-actions / clippy
use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp_opt`: use `DateTime::from_timestamp` instead
--> src/validate/forge.rs:20:28
|
20 | NaiveDateTime::from_timestamp_opt(1540122067, 0).unwrap(),
| ^^^^^^^^^^^^^^^^^^
Check warning on line 577 in src/routes/v3/organizations.rs
github-actions / clippy
use of deprecated method `sqlx::query::Map::<'q, DB, F, A>::fetch_many`: Only the SQLite driver supports multiple statements in one prepared statement and that behavior is deprecated. Use `sqlx::raw_sql()` instead.
warning: use of deprecated method `sqlx::query::Map::<'q, DB, F, A>::fetch_many`: Only the SQLite driver supports multiple statements in one prepared statement and that behavior is deprecated. Use `sqlx::raw_sql()` instead.
--> src/routes/v3/organizations.rs:577:6
|
577 | .fetch_many(&mut *transaction)
| ^^^^^^^^^^
Check warning on line 80 in src/routes/v3/organizations.rs
github-actions / clippy
use of deprecated method `sqlx::query::Map::<'q, DB, F, A>::fetch_many`: Only the SQLite driver supports multiple statements in one prepared statement and that behavior is deprecated. Use `sqlx::raw_sql()` instead.
warning: use of deprecated method `sqlx::query::Map::<'q, DB, F, A>::fetch_many`: Only the SQLite driver supports multiple statements in one prepared statement and that behavior is deprecated. Use `sqlx::raw_sql()` instead.
--> src/routes/v3/organizations.rs:80:6
|
80 | .fetch_many(&**pool)
| ^^^^^^^^^^