Skip to content

Commit

Permalink
Move lints to Cargo.toml.
Browse files Browse the repository at this point in the history
  • Loading branch information
KmolYuan committed Nov 27, 2023
1 parent 6b2d5c7 commit 866a479
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ license = "AGPL-3.0-or-later"
repository = "https://github.com/KmolYuan/four-bar-rs"
keywords = ["mechanism", "simulation", "optimization"]
categories = ["algorithms"]

[workspace.lints.rust]
unsafe-code = "forbid"

[workspace.lints.clippy]
semicolon-if-nothing-returned = "warn"
3 changes: 3 additions & 0 deletions four-bar-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ winapi = { version = "0.3", features = ["wincon", "winuser"], optional = true }
[target.'cfg(windows)'.build-dependencies]
image = "0.24"
winres = "0.1"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions four-bar-ui/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![warn(clippy::semicolon_if_nothing_returned)]

mod app;
#[cfg(not(target_arch = "wasm32"))]
mod cli;
Expand Down
3 changes: 3 additions & 0 deletions four-bar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ optional = true
[dev-dependencies]
approx = "0.5"

[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
1 change: 0 additions & 1 deletion four-bar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//! ```
#![cfg_attr(doc_cfg, feature(doc_auto_cfg))]
#![warn(missing_docs)]
#![warn(clippy::semicolon_if_nothing_returned)]

pub use crate::fb::{FourBar, NormFourBar, SFourBar, SNormFourBar};
#[doc(no_inline)]
Expand Down

0 comments on commit 866a479

Please sign in to comment.