Age | Commit message (Collapse) | Author |
|
See https://doc.rust-lang.org/stable/clippy/configuration.html#specifying-the-minimum-supported-rust-version
|
|
|
|
A complex type without a name tends to be harder to understand. We
have a few of them. Using "type" to give them a name would hopefully
help, but I don't understand the code well enough to come up with
meaningful names, and meaningless names won't help. Also, arguably, a
struct or enum would often be the better approach, but would change
the API. Thus, I'm only configuring clippy to allow complex types. We
should later revisit this and improve the code, when we're making
other API changes anyway.
Found by clippy lint type_complexity:
https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
|
By default, clippy allows up to seven arguments to a function.
Anything more and it will complain.
https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Seven is already a very large number. However, changing the number of
arguments in public functions would change the API of the library, so
I've upped the limit to ten, which is enough to placate clippy.
Arguably, when we are changing the API anyway, we should consider ways
to remove the number of arguments to functions, possibly by using the
builder pattern.
|
|
clippy warns if one of the variants of an enum is significantly larger
than the others, as that can cause surprising memory use: an enum uses
as much space as its largest variant. We have some such enums, but
changing them to have variants of similar size would change the API so
I've chosen to allow variants up to 512 bytes.
Found by clippy lint large_enum_variant:
https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
|
|
We rely on Rust toolchain 1.48.0, which has a clippy that does not
understand the msrv field.
|
|
|