Skip to content

Commit

Permalink
chore: fix some trivial typos (#1225)
Browse files Browse the repository at this point in the history
Fixes typos in Rustdoc and makes explicit use of `dyn`.
  • Loading branch information
Folyd authored Feb 5, 2021
1 parent c0939c3 commit 70ee64a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
4 changes: 2 additions & 2 deletions tracing-subscriber/src/registry/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl ExtensionsInner {
.and_then(|boxed| {
#[allow(warnings)]
{
(boxed as Box<Any + 'static>)
(boxed as Box<dyn Any + 'static>)
.downcast()
.ok()
.map(|boxed| *boxed)
Expand Down Expand Up @@ -162,7 +162,7 @@ impl ExtensionsInner {
self.map.remove(&TypeId::of::<T>()).and_then(|boxed| {
#[allow(warnings)]
{
(boxed as Box<Any + 'static>)
(boxed as Box<dyn Any + 'static>)
.downcast()
.ok()
.map(|boxed| *boxed)
Expand Down
4 changes: 2 additions & 2 deletions tracing-subscriber/src/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand All @@ -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);
Expand Down

0 comments on commit 70ee64a

Please sign in to comment.