diff --git a/Cargo.toml b/Cargo.toml index 4cdb339..a1cbdd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,21 @@ alloc = [] unsafe_code = "forbid" [lints.clippy] +all = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 } +correctness = "deny" +suspicious = "deny" +unwrap_used = "deny" +expect_used = "deny" # The `x & MASK == 0` form mirrors the LZO1X spec's instruction decoding and is # clearer here than `trailing_zeros()`. -verbose_bit_mask = "allow" +verbose_bit_mask = { level = "allow", priority = 1 } # Error variants are self-describing via `Error`'s docs/Display. -missing_errors_doc = "allow" +missing_errors_doc = { level = "allow", priority = 1 } +module_name_repetitions = { level = "allow", priority = 1 } +must_use_candidate = { level = "allow", priority = 1 } +missing_panics_doc = { level = "allow", priority = 1 } +cast_possible_truncation = { level = "allow", priority = 1 } +cast_possible_wrap = { level = "allow", priority = 1 } +cast_sign_loss = { level = "allow", priority = 1 } +cast_precision_loss = { level = "allow", priority = 1 } diff --git a/tests/errors.rs b/tests/errors.rs index f47acf4..323e2bb 100644 --- a/tests/errors.rs +++ b/tests/errors.rs @@ -2,6 +2,8 @@ //! malformed, truncated, or crafted input — so these double as e2e coverage of //! the decoder's guards, and assert it never panics on hostile bytes. +#![allow(clippy::unwrap_used, clippy::expect_used)] + use lzo::{decompress_into, Error}; // "hello, lzo world!" compressed by liblzo2's lzo1x_1, then the EOF marker. diff --git a/tests/roundtrip.rs b/tests/roundtrip.rs index b965701..a53902f 100644 --- a/tests/roundtrip.rs +++ b/tests/roundtrip.rs @@ -3,6 +3,8 @@ //! original, `.lzo` the compressed block). Each block must decompress to //! exactly its original. +#![allow(clippy::unwrap_used, clippy::expect_used)] + use std::path::Path; const DATA: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/data");