Skip to content

Commit

Permalink
Move the lint configuration into the Cargo.toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed Sep 18, 2024
1 parent 57cbf7e commit d0b0f1d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 15 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)'] }
unsafe_code = "deny"
dead_code = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_extern_crates = "deny"
unused_import_braces = "deny"
unused_qualifications = "deny"
rust_2018_idioms = "deny"

[lints.clippy]
unwrap_used = "deny"
mem_forget = "deny"
missing_const_for_fn = "warn"

[features]
default = ["libolm-compat"]
Expand Down
14 changes: 0 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,6 @@
//! }
//! ```

#![deny(
clippy::mem_forget,
clippy::unwrap_used,
dead_code,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unsafe_op_in_unsafe_fn,
unused_extern_crates,
unused_import_braces,
unused_qualifications,
rust_2018_idioms
)]
#![warn(clippy::missing_const_for_fn)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

mod cipher;
Expand Down

0 comments on commit d0b0f1d

Please sign in to comment.