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.
This commit is contained in:
Hayden Stainsby 2025-03-24 19:52:48 +01:00
parent bfca5460e1
commit f341d53190
2 changed files with 12 additions and 5 deletions

View File

@ -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,

View File

@ -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