clippy: Configure via `lints` table in `Cargo.toml` (#185)

As of Rust 1.74, lints can be configured within the `Cargo.toml`
which allows us to not have to configure them in the source code
as well as simplifying having a single configuration across an
entire workspace.

This is documented at: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-lints-section
This commit is contained in:
Bruce Mitchener 2024-03-09 23:26:02 +07:00 committed by GitHub
parent a0db0a4a61
commit fbe553f9de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 27 additions and 0 deletions

View File

@ -19,6 +19,9 @@ license = "Apache-2.0"
xilem_core = { version = "0.1.0", path = "crates/xilem_core" }
kurbo = "0.11.0"
[workspace.lints]
clippy.semicolon_if_nothing_returned = "warn"
[package]
name = "xilem"
version = "0.1.0"
@ -39,6 +42,9 @@ default-target = "x86_64-pc-windows-msvc"
# rustdoc-scrape-examples tracking issue https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[lints]
workspace = true
[features]
default = ["x11", "taffy"]

View File

@ -17,4 +17,7 @@ default-target = "x86_64-pc-windows-msvc"
# rustdoc-scrape-examples tracking issue https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[lints]
workspace = true
[dependencies]

View File

@ -17,6 +17,9 @@ default-target = "x86_64-pc-windows-msvc"
# rustdoc-scrape-examples tracking issue https://github.com/rust-lang/rust/issues/88791
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
[lints]
workspace = true
[dependencies]
xilem_core.workspace = true
kurbo.workspace = true

View File

@ -5,6 +5,9 @@ publish = false
license.workspace = true
edition.workspace = true
[lints]
workspace = true
[dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2.87"

View File

@ -5,6 +5,9 @@ publish = false
license.workspace = true
edition.workspace = true
[lints]
workspace = true
[dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2.87"

View File

@ -5,6 +5,9 @@ publish = false
license.workspace = true
edition.workspace = true
[lints]
workspace = true
[dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2.87"

View File

@ -5,6 +5,9 @@ publish = false
license.workspace = true
edition.workspace = true
[lints]
workspace = true
[dependencies]
console_error_panic_hook = "0.1"
wasm-bindgen = "0.2.87"

View File

@ -5,6 +5,9 @@ publish = false
license.workspace = true
edition.workspace = true
[lints]
workspace = true
[dependencies]
console_error_panic_hook = "0.1.7"
serde = { version = "1.0.170", features = ["derive"] }