Skip to content

build: feature(impl_trait_in_assoc_type) #223

build: feature(impl_trait_in_assoc_type)

build: feature(impl_trait_in_assoc_type) #223

GitHub Actions / clippy succeeded Jan 13, 2024 in 0s

clippy

5 warnings

Details

Results

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

Versions

  • rustc 1.77.0-nightly (e51e98dde 2023-12-31)
  • cargo 1.77.0-nightly (ac6bbb332 2023-12-26)
  • clippy 0.1.77 (e51e98d 2023-12-31)

Annotations

Check warning on line 60 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
  --> src/main.rs:60:30
   |
60 |     let locale = Locale::new(&*CONFIG.locale)?;
   |                              ^^^^^^^^^^^^^^^ help: try: `&CONFIG.locale`
   |
   = 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 32 in src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `room_id` is never used

warning: method `room_id` is never used
  --> src/config.rs:32:10
   |
27 | impl Config {
   | ----------- method in this implementation
...
32 |   pub fn room_id(&self, target: i64) -> Option<Arc<Uuid>> {
   |          ^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 25 in src/commands/manage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `address`

warning: unused variable: `address`
  --> src/commands/manage.rs:25:41
   |
25 |       ManageCommand::NewProfile { name, address } => {}
   |                                         ^^^^^^^ help: try ignoring the field: `address: _`

Check warning on line 25 in src/commands/manage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `name`

warning: unused variable: `name`
  --> src/commands/manage.rs:25:35
   |
25 |       ManageCommand::NewProfile { name, address } => {}
   |                                   ^^^^ help: try ignoring the field: `name: _`
   |
   = note: `#[warn(unused_variables)]` on by default

Check warning on line 136 in src/bot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

warning: this `else { if .. }` block can be collapsed
   --> src/bot.rs:125:12
    |
125 |       } else {
    |  ____________^
126 | |       if is_webp {
127 | |         self.inner.send_sticker(chat_id, photo.clone()).await
128 | |       } else {
...   |
135 | |       }
136 | |     };
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
    = note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
    |
125 ~     } else if is_webp {
126 +       self.inner.send_sticker(chat_id, photo.clone()).await
127 +     } else {
128 +       let send = self.inner.send_photo(chat_id, photo.clone());
129 +       if let Some(reply) = reply {
130 +         send.reply_to_message_id(MessageId(reply)).await
131 +       } else {
132 +         send.await
133 +       }
134 ~     };
    |