Skip to content

Add debug command

Add debug command #155

GitHub Actions / Clippy Output succeeded Nov 24, 2024 in 0s

Clippy Output

23 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 23
Note 0
Help 0

Versions

  • rustc 1.85.0-nightly (a47555110 2024-11-22)
  • cargo 1.85.0-nightly (66221abde 2024-11-19)
  • clippy 0.1.84 (a47555110c 2024-11-22)

Annotations

Check warning on line 52 in scripty_commands/src/cmds/transcribe_message.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
  --> scripty_commands/src/cmds/transcribe_message.rs:50:5
   |
50 |       if target
   |  ________^
51 | |         .flags
52 | |         .map_or(false, |f| f.contains(MessageFlags::IS_VOICE_MESSAGE))
   | |______________________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
   |
50 ~     if target
51 ~         .flags.is_some_and(|f| f.contains(MessageFlags::IS_VOICE_MESSAGE))
   |

Check warning on line 60 in scripty_commands/src/cmds/premium/info.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
  --> scripty_commands/src/cmds/premium/info.rs:60:20
   |
60 |         let trial_used = res.as_ref().map_or(false, |row| row.trial_used);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `res.as_ref().is_some_and(|row| row.trial_used)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or

Check warning on line 152 in scripty_commands/src/cmds/join.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
   --> scripty_commands/src/cmds/join.rs:152:19
    |
152 |     let trial_used = res.as_ref().map_or(false, |row| row.trial_used);
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `res.as_ref().is_some_and(|row| row.trial_used)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default

Check warning on line 10 in scripty_webserver/src/auth.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

field `token` is never read

warning: field `token` is never read
  --> scripty_webserver/src/auth.rs:10:6
   |
8  | pub struct Authentication {
   |            -------------- field in this struct
9  |     /// The token used for auth.
10 |     pub token:   String,
   |         ^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 43 in scripty_bot_utils/src/handler/normal/voice_state_update.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
  --> scripty_bot_utils/src/handler/normal/voice_state_update.rs:40:18
   |
40 |                   let is_bot = guild
   |  ______________________________^
41 | |                     .members
42 | |                     .get(&vs.user_id)
43 | |                     .map_or(false, |m| m.user.bot());
   | |____________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
   |
40 ~                 let is_bot = guild
41 ~                     .members
42 ~                     .get(&vs.user_id).is_some_and(|m| m.user.bot());
   |

Check warning on line 106 in scripty_bot_utils/src/generic_audio_message.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
   --> scripty_bot_utils/src/generic_audio_message.rs:104:5
    |
104 |       if msg.flags.map_or(false, |flags| {
    |  ________^
105 | |         flags.contains(MessageFlags::IS_VOICE_MESSAGE)
106 | |     }) {
    | |______^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
104 ~     if msg.flags.is_some_and(|flags| {
105 ~         flags.contains(MessageFlags::IS_VOICE_MESSAGE)
106 ~     }) {
    |

Check warning on line 168 in scripty_bot_utils/src/entity_block.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
   --> scripty_bot_utils/src/entity_block.rs:168:1
    |
168 | pub async fn add_blocked_guild(guild_id: GuildId, reason: Option<String>) -> Result<(), Error> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
    = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: scripty_redis::redis::FromRedisValue` will fail
   --> scripty_bot_utils/src/entity_block.rs:185:4
    |
185 |         .set(
    |          ^^^

Check warning on line 138 in scripty_bot_utils/src/entity_block.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
   --> scripty_bot_utils/src/entity_block.rs:138:1
    |
138 | pub async fn add_blocked_user(user_id: UserId, reason: Option<String>) -> Result<(), Error> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
    = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: scripty_redis::redis::FromRedisValue` will fail
   --> scripty_bot_utils/src/entity_block.rs:155:4
    |
155 |         .set(
    |          ^^^

Check warning on line 8 in scripty_bot_utils/src/entity_block.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
  --> scripty_bot_utils/src/entity_block.rs:8:1
   |
8  | pub async fn init_blocked() -> Result<(), scripty_redis::redis::RedisError> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
   = help: specify the types explicitly
note: in edition 2024, the requirement `!: scripty_redis::redis::FromRedisValue` will fail
  --> scripty_bot_utils/src/entity_block.rs:34:5
   |
34 |             .query_async(&mut redis_pool)
   |              ^^^^^^^^^^^
   = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

Check warning on line 109 in scripty_audio_handler/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

you are using an explicit closure for copying elements

warning: you are using an explicit closure for copying elements
   --> scripty_audio_handler/src/lib.rs:109:15
    |
109 |         next_ssrcs: v.next_user_list.read().iter().map(|x| *x).collect(),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `v.next_user_list.read().iter().copied()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
    = note: `#[warn(clippy::map_clone)]` on by default

Check warning on line 375 in scripty_audio_handler/src/events/voice_tick.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
   --> scripty_audio_handler/src/events/voice_tick.rs:372:6
    |
372 |           if ssrc_state
    |  ____________^
373 | |             .ssrc_user_data_map
374 | |             .get(&ssrc)
375 | |             .map_or(false, |x| !x.value().2)
    | |____________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
    |
372 ~         if ssrc_state
373 ~             .ssrc_user_data_map
374 ~             .get(&ssrc).is_some_and(|x| !x.value().2)
    |

Check warning on line 366 in scripty_audio_handler/src/events/voice_tick.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this `map_or` is redundant

warning: this `map_or` is redundant
   --> scripty_audio_handler/src/events/voice_tick.rs:363:6
    |
363 |           if ssrc_state
    |  ____________^
364 | |             .ssrc_ignored_map
365 | |             .get(&ssrc)
366 | |             .map_or(false, |x| *x.value())
    | |__________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
363 ~         if ssrc_state
364 ~             .ssrc_ignored_map
365 ~             .get(&ssrc).is_some_and(|x| *x.value())
    |

Check warning on line 28 in scripty_audio_handler/src/events/driver_disconnect.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function has too many arguments (10/7)

warning: this function has too many arguments (10/7)
  --> scripty_audio_handler/src/events/driver_disconnect.rs:17:1
   |
17 | / pub async fn driver_disconnect(
18 | |     guild_id: GuildId,
19 | |     reason: Option<DisconnectReason>,
20 | |     ctx: Context,
...  |
27 | |     ephemeral: bool,
28 | | ) {
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 90 in scripty_audio_handler/src/audio_handler.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function has too many arguments (10/7)

warning: this function has too many arguments (10/7)
  --> scripty_audio_handler/src/audio_handler.rs:79:2
   |
79 | /     pub async fn new(
80 | |         guild_id: GuildId,
81 | |         webhook: Webhook,
82 | |         context: Context,
...  |
89 | |         ephemeral: bool,
90 | |     ) -> Result<Self, Error> {
   | |____________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
   = note: `#[warn(clippy::too_many_arguments)]` on by default

Check warning on line 79 in scripty_audio_handler/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

multiple fields are never read

warning: multiple fields are never read
  --> scripty_audio_handler/src/lib.rs:79:2
   |
77 | pub struct InternalSsrcStateDetails {
   |            ------------------------ fields in this struct
78 |     /// All seen SSRCs
79 |     seen_users: Vec<u32>,
   |     ^^^^^^^^^^
80 |     /// List of SSRCs who have an active stream pending
81 |     ssrcs_with_stream: Vec<u32>,
   |     ^^^^^^^^^^^^^^^^^
82 |     /// All SSRCs that have a user details tuple attached
83 |     ssrcs_with_attached_data: Vec<u32>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
84 |     /// List of SSRCs that are currently being ignored by the bot
85 |     ignored_ssrcs: Vec<u32>,
   |     ^^^^^^^^^^^^^
86 |     /// All actively speaking SSRCs
87 |     ssrcs_actively_speaking_this_tick: Vec<u32>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88 |     /// All SSRCs currently being transcribed
89 |     actively_transcribed_ssrcs: Vec<u32>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
90 |     /// Next SSRCs to be pushed to actively_transcribed_ssrcs when it drops below the required threshold
91 |     next_ssrcs: Vec<u32>,
   |     ^^^^^^^^^^
   |
   = note: `InternalSsrcStateDetails` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

Check warning on line 148 in scripty_audio_handler/src/events/voice_tick.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unused variable: `auto_detect_lang`

warning: unused variable: `auto_detect_lang`
   --> scripty_audio_handler/src/events/voice_tick.rs:148:3
    |
148 |         auto_detect_lang,
    |         ^^^^^^^^^^^^^^^^ help: try ignoring the field: `auto_detect_lang: _`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 25 in scripty_audio_handler/src/connect.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
   --> scripty_audio_handler/src/connect.rs:17:1
    |
17  | / pub async fn connect_to_vc(
18  | |     ctx: Context,
19  | |     guild_id: GuildId,
20  | |     channel_id: ChannelId,
...   |
24  | |     ephemeral: bool,
25  | | ) -> Result<(), Error> {
    | |______________________^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
    = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: scripty_redis::redis::FromRedisValue` will fail
   --> scripty_audio_handler/src/connect.rs:121:2
    |
121 | /     scripty_redis::run_transaction("SET", |f| {
122 | |         f.arg(format!("voice:{{{}}}:webhook_token", guild_id))
123 | |             .arg(webhook_token.expose_secret())
124 | |             .arg("EX")
125 | |             .arg(leave_delta + 5);
126 | |     })
    | |______^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

Check warning on line 9 in scripty_botlists/src/lists/disforge_com/models.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

field `message` is never read

warning: field `message` is never read
 --> scripty_botlists/src/lists/disforge_com/models.rs:9:6
  |
7 | pub struct PostStatsResponse {
  |            ----------------- field in this struct
8 |     pub status:  String,
9 |     pub message: String,
  |         ^^^^^^^
  |
  = note: `PostStatsResponse` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

Check warning on line 11 in scripty_botlists/src/lists/discordextremelist_xyz/models.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

field `status` is never read

warning: field `status` is never read
  --> scripty_botlists/src/lists/discordextremelist_xyz/models.rs:11:6
   |
9  | pub struct PostStatsResponse {
   |            ----------------- field in this struct
10 |     pub error:  bool,
11 |     pub status: u16,
   |         ^^^^^^
   |
   = note: `PostStatsResponse` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

Check warning on line 10 in scripty_botlists/src/lists/discord_bots_gg/models.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

fields `code` and `message` are never read

warning: fields `code` and `message` are never read
  --> scripty_botlists/src/lists/discord_bots_gg/models.rs:10:6
   |
9  | pub struct PostStatsResponse {
   |            ----------------- fields in this struct
10 |     pub code:    u16,
   |         ^^^^
11 |     pub message: String,
   |         ^^^^^^^
   |
   = note: `PostStatsResponse` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

Check warning on line 2 in scripty_data_storage/src/cache/voice.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

function `init_voice_cache_async` is never used

warning: function `init_voice_cache_async` is never used
 --> scripty_data_storage/src/cache/voice.rs:2:14
  |
2 | pub async fn init_voice_cache_async() -> Result<(), scripty_redis::redis::RedisError> {
  |              ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

Check warning on line 2 in scripty_data_storage/src/cache/voice.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
  --> scripty_data_storage/src/cache/voice.rs:2:1
   |
2  | pub async fn init_voice_cache_async() -> Result<(), scripty_redis::redis::RedisError> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
   = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
   = help: specify the types explicitly
note: in edition 2024, the requirement `!: scripty_redis::redis::FromRedisValue` will fail
  --> scripty_data_storage/src/cache/voice.rs:19:4
   |
19 |         .query_async(
   |          ^^^^^^^^^^^
   = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default

Check warning on line 82 in scripty_automod/src/types.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
  --> scripty_automod/src/types.rs:73:2
   |
73 | /     pub fn new(
74 | |         guild_id: u64,
75 | |         internal_id: i32,
76 | |         enabled: bool,
...  |
81 | |         auto_join_voice: bool,
82 | |     ) -> Self {
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
   = note: `#[warn(clippy::too_many_arguments)]` on by default