Skip to content

Commit

Permalink
chore: fixes for clippy changes in Rust 1.74 (tokio-rs#2814)
Browse files Browse the repository at this point in the history
With the release of Rust 1.74, there are some new or modified clippy
lints that need adaption in the code.

The main change was the removal of the `private_in_public`.
https://rust-lang.github.io/rfcs/2145-type-privacy.html

Then two more changes were required, in one case to adhere a lint and
the other to allow it. When talking about what an "application" needs to
do when setting up `tracing-error`, it makes sense to include `fn
main()` in the doctest, even though the lint recommends against it.
; Conflicts:
;	examples/examples/map-traced-error.rs
  • Loading branch information
hds authored and hawkw committed Mar 1, 2024
1 parent 0e4a4be commit 571c530
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 11 deletions.
3 changes: 2 additions & 1 deletion tracing-appender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused_allocation,
unused_comparisons,
Expand Down
3 changes: 2 additions & 1 deletion tracing-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
4 changes: 3 additions & 1 deletion tracing-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png",
issue_tracker_base_url = "https:/tokio-rs/tracing/issues/"
)]
#![allow(clippy::needless_doctest_main)]
#![warn(
missing_debug_implementations,
missing_docs,
Expand All @@ -196,7 +197,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-flame/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-futures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-serde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-subscriber/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing-tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
3 changes: 2 additions & 1 deletion tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,8 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
unconditional_recursion,
unused,
unused_allocation,
Expand Down

0 comments on commit 571c530

Please sign in to comment.