diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-29 09:14:33 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@sequoia-pgp.org> | 2021-09-30 08:31:16 +0300 |
commit | c8f7cba5f711666b411460fa5822e39ff5671d8a (patch) | |
tree | da157bb79b4b336c10032ca3442b2db553dbdd32 | |
parent | 618aa1d65d9748a0f66fbb1be0a7509544d53c2f (diff) |
Allow enum variants up to 512 bytes
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
-rw-r--r-- | clippy.toml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clippy.toml b/clippy.toml index 1567d2b9..b0b9e02e 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,3 +1,5 @@ # Disabled until we use at least Rust 1.49.0, which is the first # version that supports the msrv field. #msrv = "1.48.0" + +enum-variant-size-threshold = 512
\ No newline at end of file |