Skip to content

Commit 557fb86

Browse files
committed
chore: Use lint config in manifest
1 parent 9691256 commit 557fb86

File tree

16 files changed

+35
-43
lines changed

16 files changed

+35
-43
lines changed

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ members = [
3030
"tests/skip_debug",
3131
]
3232
resolver = "2"
33+
34+
[workspace.lints.rust]
35+
missing_debug_implementations = "warn"
36+
missing_docs = "warn"
37+
rust_2018_idioms = "warn"
38+
unreachable_pub = "warn"
39+
40+
[workspace.lints.rustdoc]
41+
broken_intra_doc_links = "deny"

tonic-build/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ prost = ["prost-build", "dep:prost-types"]
2828
cleanup-markdown = ["prost-build?/cleanup-markdown"]
2929
transport = []
3030

31+
[lints]
32+
workspace = true
33+
3134
[package.metadata.docs.rs]
3235
all-features = true
3336

tonic-build/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,9 @@
6161
//! fails with `No such file or directory` error.
6262
6363
#![recursion_limit = "256"]
64-
#![warn(
65-
missing_debug_implementations,
66-
missing_docs,
67-
rust_2018_idioms,
68-
unreachable_pub
69-
)]
7064
#![doc(
7165
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
7266
)]
73-
#![deny(rustdoc::broken_intra_doc_links)]
7467
#![doc(html_root_url = "https://docs.rs/tonic-build/0.13.0")]
7568
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
7669
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]

tonic-health/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]}
3030
tokio-stream = "0.1"
3131
prost-types = "0.13.0"
3232

33+
[lints]
34+
workspace = true
35+
3336
[package.metadata.cargo_check_external_types]
3437
allowed_external_types = [
3538
"tonic::*",

tonic-health/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,9 @@
66
//!
77
//! [here]: https://github.com/hyperium/tonic/blob/master/examples/src/health/server.rs
88
9-
#![warn(
10-
missing_debug_implementations,
11-
missing_docs,
12-
rust_2018_idioms,
13-
unreachable_pub
14-
)]
159
#![doc(
1610
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
1711
)]
18-
#![deny(rustdoc::broken_intra_doc_links)]
1912
#![doc(html_root_url = "https://docs.rs/tonic-health/0.13.0")]
2013
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
2114
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]

tonic-reflection/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ tonic = { version = "0.13.0", path = "../tonic", default-features = false, featu
3636
[dev-dependencies]
3737
tonic = { version = "0.13.0", path = "../tonic", default-features = false, features = ["transport"] }
3838

39+
[lints]
40+
workspace = true
41+
3942
[package.metadata.cargo_check_external_types]
4043
allowed_external_types = [
4144
"tonic::*",

tonic-reflection/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
//! A `tonic` based gRPC Server Reflection implementation.
22
3-
#![warn(
4-
missing_debug_implementations,
5-
missing_docs,
6-
rust_2018_idioms,
7-
unreachable_pub
8-
)]
93
#![doc(
104
html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
115
)]
12-
#![deny(rustdoc::broken_intra_doc_links)]
136
#![doc(html_root_url = "https://docs.rs/tonic-reflection/0.13.0")]
147
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
158
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]

tonic-reflection/tests/server.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(missing_docs)]
2+
13
use prost::Message;
24
use std::net::SocketAddr;
35
use tokio::sync::oneshot;

tonic-reflection/tests/versions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(missing_docs)]
2+
13
use std::net::SocketAddr;
24

35
use tokio::sync::oneshot;

tonic-types/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ prost = "0.13"
2222
prost-types = "0.13"
2323
tonic = { version = "0.13.0", path = "../tonic", default-features = false }
2424

25+
[lints]
26+
workspace = true
27+
2528
[package.metadata.cargo_check_external_types]
2629
allowed_external_types = [
2730
"tonic::*",

0 commit comments

Comments
 (0)