Skip to content

revert: cargo update #90

revert: cargo update

revert: cargo update #90

GitHub Actions / clippy succeeded Apr 22, 2024 in 1s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (11)

src/commands/config/moderation.rs|30 col 38| warning: writing &Vec instead of &[_] involves a new object where a slice will do
--> src/commands/config/moderation.rs:30:38
|
30 | fn generate_message(escalations: &Vec) -> Response {
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[ActionEscalation]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: #[warn(clippy::ptr_arg)] on by default
src/commands/config/moderation.rs|612 col 36| warning: accessing first element with values.get(0)
--> src/commands/config/moderation.rs:612:36
|
612 | let role = values
| ^
613 | | .get(0)
| |
^ help: try: values.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: #[warn(clippy::get_first)] on by default
src/events/message.rs|8 col 26| warning: accessing first element with message.attachments.get(0)
--> src/events/message.rs:8:26
|
8 | let attachment = message.attachments.get(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: message.attachments.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
src/events/message_delete.rs|42 col 38| warning: accessing first element with audit_log.entries.get(0)
--> src/events/message_delete.rs:42:38
|
42 | if let Some(entry) = audit_log.entries.get(0) {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: audit_log.entries.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
src/events/message_edit.rs|57 col 34| warning: accessing first element with attachments.get(0)
--> src/events/message_edit.rs:57:34
|
57 | Some(attachments) => attachments
| __________________________________^
58 | | .get(0)
| |
______________________^ help: try: attachments.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
src/events/reaction_add.rs|196 col 30| warning: accessing first element with message .attachments.get(0)
--> src/events/reaction_add.rs:196:30
|
196 | let attachment = message
| ____^
197 | | .attachments
198 | | .get(0)
| |
^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
help: try
|
196 ~ let attachment = message
197 + .attachments.first()
|
src/models/actions.rs|43 col 5| warning: field name starts with the struct's name
--> src/models/actions.rs:43:5
|
43 | pub action_type: ActionType,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: #[warn(clippy::struct_field_names)] implied by #[warn(clippy::pedantic)]
src/models/boards.rs|24 col 1| warning: all fields have the same postfix: id
--> src/models/boards.rs:24:1
|
24 | / pub struct BoardEntry {
25 | | pub guild_id: i64,
26 | | pub channel_id: i64,
27 | | pub message_id: i64,
28 | | }
| |
^
|
= help: remove the postfixes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
src/models/config.rs|6 col 1| warning: all fields have the same prefix: log
--> src/models/config.rs:6:1
|
6 | / pub struct LoggingConfig {
7 | | pub log_actions: bool,
8 | | pub log_messages: bool,
9 | | pub log_voice: bool,
... |
13 | | pub log_voice_channel: Option,
14 | | }
| |
^
|
= help: remove the prefixes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
src/models/message.rs|10 col 5| warning: field name starts with the struct's name
--> src/models/message.rs:10:5
|
10 | pub message_id: i64,
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names
src/models/message.rs|121 col 1| warning: all fields have the same postfix: id
--> src/models/message.rs:121:1
|
121 | / pub struct MessageQuery {
122 | | pub guild_id: i64,
123 | | pub channel_id: i64,
124 | | pub message_id: i64,
125 | | }
| |
^
|
= help: remove the postfixes
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#struct_field_names