Skip to content

Commit

Permalink
subscriber: fix broken docs links (#1825)
Browse files Browse the repository at this point in the history
Apparently the links to the `Default::default()` methods didn't actually
work! Or, maybe they did work, but they don't on the latest nightly?

Regardless, this fixes them (as well as the RustDoc errors).

Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw committed Jan 14, 2022
1 parent 1413148 commit 1a81e0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tracing-subscriber/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
//! .with_thread_names(true) // include the name of the current thread
//! .compact(); // use the `Compact` formatting style.
//!
//! // Create a `fmt` collector that uses our custom event format, and set it
//! // Create a `fmt` subscriber that uses our custom event format, and set it
//! // as the default.
//! tracing_subscriber::fmt()
//! .event_format(format)
Expand Down Expand Up @@ -420,7 +420,7 @@ pub struct SubscriberBuilder<
/// ```
///
/// [formatting subscriber]: Subscriber
/// [`SubscriberBuilder::default()`]: SubscriberBuilder::default()
/// [`SubscriberBuilder::default()`]: struct.SubscriberBuilder.html#method.default
/// [`init`]: SubscriberBuilder::init()
/// [`try_init`]: SubscriberBuilder::try_init()
/// [`finish`]: SubscriberBuilder::finish()
Expand All @@ -432,10 +432,11 @@ pub fn fmt() -> SubscriberBuilder {
/// Returns a new [formatting layer] that can be [composed] with other layers to
/// construct a [`Subscriber`].
///
/// This is a shorthand for the equivalent [`Layer::default`] function.
/// This is a shorthand for the equivalent [`Layer::default()`] function.
///
/// [formatting layer]: Layer
/// [composed]: crate::layer
/// [`Layer::default()`]: struct.Layer.html#method.default
#[cfg_attr(docsrs, doc(cfg(all(feature = "fmt", feature = "std"))))]
pub fn layer<S>() -> Layer<S> {
Layer::default()
Expand Down

0 comments on commit 1a81e0d

Please sign in to comment.