Skip to content

Commit 915daf4

Browse files
lints: use [workspace.lints]
Depends on a newly stabilized feature which will be in 1.75 and available on nightly today rust-lang/cargo#12115 (comment)
1 parent da717bd commit 915daf4

File tree

10 files changed

+32
-2
lines changed

10 files changed

+32
-2
lines changed

.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[build]
2-
rustflags = ["-Wmissing_debug_implementations", "-Wclippy::unused-async"]
2+
rustflags = []

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ jobs:
272272
runs-on: ubuntu-latest
273273
steps:
274274
- uses: actions/checkout@master
275-
- uses: dtolnay/rust-toolchain@stable
275+
# Can be switched back once 1.75 lands
276+
# https://github.com/rust-lang/cargo/issues/12115#issuecomment-1768170381
277+
- uses: dtolnay/rust-toolchain@nightly
276278
with:
277279
components: clippy
278280

Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ debug-assertions = false
2222
opt-level = 3
2323
panic = 'abort'
2424
incremental = false
25+
26+
27+
[workspace.lints.rust]
28+
missing_debug_implementations = "warn"
29+
30+
[workspace.lints.clippy]
31+
unused-async = "warn"

iroh-bytes/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
1212
rust-version = "1.72"
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
anyhow = { version = "1", features = ["backtrace"] }
1619
bao-tree = { version = "0.9.1", features = ["tokio_fsm"], default-features = false }

iroh-gossip/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh-sync"
1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
1212
rust-version = "1.72"
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
# proto dependencies (required)
1619
anyhow = { version = "1", features = ["backtrace"] }

iroh-metrics/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
1212
rust-version = "1.72"
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
prometheus-client = { version = "0.21.0", optional = true }
1619
once_cell = "1.17.0"

iroh-net/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
1212
rust-version = "1.72"
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
aead = { version = "0.5.2", features = ["bytes"] }
1619
anyhow = { version = "1", features = ["backtrace"] }

iroh-sync/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ repository = "https://github.com/n0-computer/iroh"
1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
1212
rust-version = "1.72"
1313

14+
[lints]
15+
workspace = true
16+
1417
[dependencies]
1518
anyhow = "1"
1619
blake3 = { package = "iroh-blake3", version = "1.4.3"}

iroh-test/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ publish = true
1212
# Sadly this also needs to be updated in .github/workflows/ci.yml
1313
rust-version = "1.72"
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
anyhow = "1"
1720
tokio = { version = "1", features = ["full"] }

iroh/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ default-run = "iroh"
1212
# Sadly this also needs to be updated in .github/workflows/ci.yml
1313
rust-version = "1.72"
1414

15+
[lints]
16+
workspace = true
17+
1518
[dependencies]
1619
anyhow = { version = "1", features = ["backtrace"] }
1720
bao-tree = { version = "0.9.1", features = ["tokio_fsm"], default-features = false }

0 commit comments

Comments
 (0)