Skip to content

update to rust edition 2024

Sign in for the full log view
GitHub Actions / clippy succeeded Feb 22, 2025 in 1s

clippy

1 warning

Details

Results

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

Versions

  • rustc 1.87.0-nightly (794c12416 2025-02-21)
  • cargo 1.87.0-nightly (ce948f461 2025-02-14)
  • clippy 0.1.86 (794c12416b 2025-02-21)

Annotations

Check warning on line 305 in azalea-brigadier/src/command_dispatcher.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
   --> azalea-brigadier/src/command_dispatcher.rs:292:21
    |
292 | /                     match &context.command {
293 | |                         Some(context_command) => {
294 | |                             found_command = true;
...   |
304 | |                         _ => {}
305 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
    = note: `#[warn(clippy::single_match)]` on by default
help: try
    |
292 ~                     if let Some(context_command) = &context.command {
293 +                         found_command = true;
294 + 
295 +                         let value = context_command(context);
296 +                         result += value;
297 +                         // consumer.on_command_complete(context, true, value);
298 +                         successful_forks += 1;
299 + 
300 +                         // TODO: allow context_command to error and handle
301 +                         // those errors
302 +                     }
    |