From f341d53190688c05832ddc1a1a2b92023370e696 Mon Sep 17 00:00:00 2001 From: Hayden Stainsby Date: Mon, 24 Mar 2025 19:52:48 +0100 Subject: [PATCH] chore: fix Rust 1.85.0 lints and errors (#3240) We had some broken link formatting in the `tracing-journald` docs which clippy picked up (the text looked like a link definition, but wasn't meant to be). The incorrect links have now been corrected. They have to link to the `tracing-core` crate because `tracing-journald` doesn't depend on `tracing` directly. Fixes for a broken link in the `tracing-subscriber` main page and correcting the link to `Collect` from `tracing-log` (which also doesn't depend on `tracing` directly) were also included. --- tracing-journald/src/lib.rs | 16 +++++++++++----- tracing-subscriber/src/lib.rs | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tracing-journald/src/lib.rs b/tracing-journald/src/lib.rs index 3f0e5612..eef4837d 100644 --- a/tracing-journald/src/lib.rs +++ b/tracing-journald/src/lib.rs @@ -515,11 +515,17 @@ pub struct PriorityMappings { impl PriorityMappings { /// Returns the default priority mappings: /// - /// - [`tracing::Level::ERROR`]: [`Priority::Error`] (3) - /// - [`tracing::Level::WARN`]: [`Priority::Warning`] (4) - /// - [`tracing::Level::INFO`]: [`Priority::Notice`] (5) - /// - [`tracing::Level::DEBUG`]: [`Priority::Informational`] (6) - /// - [`tracing::Level::TRACE`]: [`Priority::Debug`] (7) + /// - [`tracing::Level::ERROR`][]: [`Priority::Error`] (3) + /// - [`tracing::Level::WARN`][]: [`Priority::Warning`] (4) + /// - [`tracing::Level::INFO`][]: [`Priority::Notice`] (5) + /// - [`tracing::Level::DEBUG`][]: [`Priority::Informational`] (6) + /// - [`tracing::Level::TRACE`][]: [`Priority::Debug`] (7) + /// + /// [`tracing::Level::ERROR`]: tracing_core::Level::ERROR + /// [`tracing::Level::WARN`]: tracing_core::Level::WARN + /// [`tracing::Level::INFO`]: tracing_core::Level::INFO + /// [`tracing::Level::DEBUG`]: tracing_core::Level::DEBUG + /// [`tracing::Level::TRACE`]: tracing_core::Level::TRACE pub fn new() -> PriorityMappings { Self { error: Priority::Error, diff --git a/tracing-subscriber/src/lib.rs b/tracing-subscriber/src/lib.rs index 373f7631..182e5d34 100644 --- a/tracing-subscriber/src/lib.rs +++ b/tracing-subscriber/src/lib.rs @@ -153,6 +153,7 @@ //! [`tracing`]: https://docs.rs/tracing/latest/tracing //! [`EnvFilter`]: filter::EnvFilter //! [`fmt`]: mod@fmt +//! [`tracing`]: https://crates.io/crates/tracing //! [`tracing-log`]: https://crates.io/crates/tracing-log //! [`smallvec`]: https://crates.io/crates/smallvec //! [`env_logger` crate]: https://crates.io/crates/env_logger