Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: apply clippy lint suggestions
warning: this argument is passed by value, but not consumed in the function body --> src/cmd/template.rs:539:24 | 539 | fn format_float(value: Value, precision: u32) -> String { | ^^^^^ help: consider taking a reference instead: `&Value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]` warning: variables can be used directly in the `format!` string --> src/cmd/template.rs:547:17 | 547 | format!("{:.1$}", float_num, precision) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]` help: change this to | 547 - format!("{:.1$}", float_num, precision) 547 + format!("{float_num:.precision$}") | warning: variables can be used directly in the `format!` string --> src/cmd/template.rs:559:27 | 559 | |num| format!("{:.1$}", num, precision), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 559 - |num| format!("{:.1$}", num, precision), 559 + |num| format!("{num:.precision$}"), |
- Loading branch information