Skip to content

add a help button

add a help button #87

GitHub Actions / clippy succeeded Jun 15, 2024 in 0s

clippy

1 warning

Details

Results

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

Versions

  • rustc 1.70.0 (90c541806 2023-05-31)
  • cargo 1.70.0 (ec8a8a0ca 2023-04-25)
  • clippy 0.1.70 (90c5418 2023-05-31)

Annotations

Check warning on line 123 in dashboard/src-tauri/src/main.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`
   --> dashboard/src-tauri/src/main.rs:117:34
    |
117 |           .on_window_event(|event| match event.event() {
    |  __________________________________^
118 | |             tauri::WindowEvent::CloseRequested { api, .. } => {
119 | |                 event.window().hide().unwrap();
120 | |                 api.prevent_close();
121 | |             }
122 | |             _ => {}
123 | |         })
    | |_________^
    |
    = 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 this
    |
117 ~         .on_window_event(|event| if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
118 +             event.window().hide().unwrap();
119 +             api.prevent_close();
120 ~         })
    |