From 70ee64a96f84b90fb50aaf4a44af241df5ce284e Mon Sep 17 00:00:00 2001 From: Folyd Date: Sat, 6 Feb 2021 01:48:48 +0800 Subject: [PATCH] chore: fix some trivial typos (#1225) Fixes typos in Rustdoc and makes explicit use of `dyn`. --- tracing-subscriber/src/fmt/mod.rs | 2 +- tracing-subscriber/src/registry/extensions.rs | 4 ++-- tracing-subscriber/src/subscribe.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tracing-subscriber/src/fmt/mod.rs b/tracing-subscriber/src/fmt/mod.rs index b0ef2d3858..97fe6b86fb 100644 --- a/tracing-subscriber/src/fmt/mod.rs +++ b/tracing-subscriber/src/fmt/mod.rs @@ -338,7 +338,7 @@ pub struct CollectorBuilder< /// Returns a new [`CollectorBuilder`] for configuring a [formatting collector]. /// -/// This is essentially shorthand for [`CollectorBuilder::default()]`. +/// This is essentially shorthand for [`CollectorBuilder::default()`]. /// /// # Examples /// diff --git a/tracing-subscriber/src/registry/extensions.rs b/tracing-subscriber/src/registry/extensions.rs index e0a9342a4b..90eac9f141 100644 --- a/tracing-subscriber/src/registry/extensions.rs +++ b/tracing-subscriber/src/registry/extensions.rs @@ -133,7 +133,7 @@ impl ExtensionsInner { .and_then(|boxed| { #[allow(warnings)] { - (boxed as Box) + (boxed as Box) .downcast() .ok() .map(|boxed| *boxed) @@ -162,7 +162,7 @@ impl ExtensionsInner { self.map.remove(&TypeId::of::()).and_then(|boxed| { #[allow(warnings)] { - (boxed as Box) + (boxed as Box) .downcast() .ok() .map(|boxed| *boxed) diff --git a/tracing-subscriber/src/subscribe.rs b/tracing-subscriber/src/subscribe.rs index 1dd58ee73c..e427ec8872 100644 --- a/tracing-subscriber/src/subscribe.rs +++ b/tracing-subscriber/src/subscribe.rs @@ -68,7 +68,7 @@ use std::{any::TypeId, marker::PhantomData}; /// } /// /// # use tracing_core::{span::{Id, Attributes, Record}, Metadata, Event}; -/// impl Collect for MySubscriber { +/// impl Collect for MyCollector { /// // ... /// # fn new_span(&self, _: &Attributes) -> Id { Id::from_u64(1) } /// # fn record(&self, _: &Id, _: &Record) {} @@ -85,7 +85,7 @@ use std::{any::TypeId, marker::PhantomData}; /// # fn new() -> Self { Self { }} /// # } /// -/// let collector = MySubscriber::new() +/// let collector = MyCollector::new() /// .with(MySubscriber::new()); /// /// tracing::collect::set_global_default(collector);