* refactor: Run rustfix
* fix: Accept `dyn Trait` as a type
Rust has started warning about trait objects without dyn on nightly.
* fix: Accept Fn(A, B) -> Type as a type
* Fixup `dyn Trait` and `dyn Fn()` in tests
* Remove `clone` calls from `Copy` types
This commit fixes code that triggered the clippy::clone_on_copy lint.
* Remove redundant field names in struct literals
This commit fixes code that triggered the clippy::redundant_field_names
lint.
* Remove unneeded `return` statements
This commit fixes code that triggered the clippy::needless_return lint.
* Remove unnecessary double parentheses
This commit fixes code that triggered the clippy::double_parens lint.
* Replace `while let` loops with `for` loops
This commit fixes code that triggered the clippy::while_let_on_iterator
lint.
* Remove needless if-else statement
This commit fixes code that triggered the clippy::needless_bool lint.
* Remove empty string from `writeln!` invocations
This commit fixes code that triggered the clippy::writeln_empty_string
lint.
* Remove redundant closures
This commit fixes code that triggered the clippy::redundant_closure
lint.
* Replace length comparisons with `is_empty`
This commit fixes code that triggered the clippy::len_zero lint.
* Remove 'static lifetime param on consts
This commit fixes code that triggered the clippy::const_static_lifetime
lint.
* Replace useless invocations of `format!`
This commit fixes code that triggered the clippy::useless_format lint.
* Remove needless lifetime params from functions
This commit fixes code that triggered the clippy::needless_lifetimes
and clippy::extra_unused_lifetimes lints.
* Replace wildcard field matches with `..`
This commit fixes code that triggered the clippy::unneeded_field_pattern
lint.
* Replace `<char> as u8` with byte literals
This commit fixes code that triggered the clippy::char_lit_as_u8 lint.
* Fix clippy warnings related to iterators
This commit fixes code that triggered the clippy lints:
- for_kv_map
- into_iter_on_ref
- filter_next
- iter_cloned_collect
- unnecessary_fold
* Fix clippy warnings related to references
This commit fixes code that triggered the clippy lints:
- match_ref_pats
- trivially_copy_pass_by_ref
- prt_arg
- toplevel_ref_arg
- op_ref
* Simplify `if` statements
This commit fixes code triggering the clippy lints:
- collapsible_if
- if_same_then_else
* Fix misc clippy warnings
This commit fixes code triggering the clippy lints:
- write_with_newline
- inconsistent_digit_grouping
- range_plus_one
- or_fun_call
- assign_op_pattern
- assertions_on_constants
Now that our minimum supported Rust version is 1.31.0, we can make the
switch from `String::trim_left` (deprecated since 1.33.0) to
`String::trim_start`.
This also lets us get rid of the `allow(deprecated)` introduced as a
workaround for issue #428.