Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 2 additions & 0 deletions tests/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions tests/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
//! original, `<name>.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");
Expand Down
Loading