dmadisetti / steam-tui

Rust TUI client for steamcmd
MIT License
858 stars 17 forks source link

Fixed most of the clippy issues #16

Closed dmadisetti closed 3 years ago

dmadisetti commented 3 years ago

See #15

Still outstanding clippy issue, that is causing problems:

warning: useless use of `vec!`
   --> src/app.rs:261:45
    |
261 |                       for (heading, value) in vec![
    |  _____________________________________________^
262 | |                         ("State", &status.state),
263 | |                         ("Installation", &status.installdir),
264 | |                         ("Size", &convert(status.size)),
265 | |                     ] {
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use a slice directly
    |
261 |                     for (heading, value) in &[("State", &status.state),
262 |                         ("Installation", &status.installdir),
263 |                         ("Size", &convert(status.size))] {

Which is not as straight forward as you'd think, because lifetime should be implicit, and the suggest fix breaks that.

Also need to throw in a github action for clippy

dmadisetti commented 3 years ago

Oh lol, that was trivial. Took me a second though