Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Fix #330: Display quick stats π
Fix these Clippy warnings: cargo clippy Checking mcfly v0.8.6 (/Users/nicolas/work/mcfly) warning: useless use of `format!` --> src/stats_generator.rs:26:24 | 26 | lines.push_str(format!("π Quick stats:\n").as_mut_str()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"π Quick stats:\n".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default warning: deref which would be done by auto-deref --> src/stats_generator.rs:29:24 | 29 | lines.push_str(&*Self::generate_command_stats( | ________________________^ 30 | | self, 31 | | limit, 32 | | most_used_commands, 33 | | )); | |_________^ | = 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 help: try | 29 ~ lines.push_str(&Self::generate_command_stats( 30 + self, 31 + limit, 32 + most_used_commands, 33 ~ )); | warning: accessing first element with `vec.get(0)` --> src/stats_generator.rs:82:9 | 82 | vec.get(0).unwrap().count | ^^^^^^^^^^ help: try: `vec.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 warning: `mcfly` (lib) generated 3 warnings (run `cargo clippy --fix --lib
- Loading branch information