Skip to content

Commit

Permalink
tracing: fix docs typos and warnings(tokio-rs#2581)
Browse files Browse the repository at this point in the history
## Motivation

When reading the docs I noticed some typo's and while fixing them I
noticed warnings from cargo doc

## Solution

Fixed the typos and the doc warnings in tracing

Co-authored-by: Neulichedl, Patrick - D0E05450 <Patrick.Neulichedl@dm-b2b.com>
  • Loading branch information
2 people authored and kaffarell committed May 22, 2024
1 parent 8f6dbfd commit 8a8b19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tracing/src/field.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//! `Span` and `Event` key-value data.
//!
//! Spans and events may be annotated with key-value data, referred to as known
//! as _fields_. These fields consist of a mapping from a key (corresponding to
//! Spans and events may be annotated with key-value data, referred to as _fields_.
//! These fields consist of a mapping from a key (corresponding to
//! a `&str` but represented internally as an array index) to a [`Value`].
//!
//! # `Value`s and `Subscriber`s
//!
//! `Subscriber`s consume `Value`s as fields attached to [span]s or [`Event`]s.
//! The set of field keys on a given span or is defined on its [`Metadata`].
//! The set of field keys on a given span or event is defined on its [`Metadata`].
//! When a span is created, it provides [`Attributes`] to the `Subscriber`'s
//! [`new_span`] method, containing any fields whose values were provided when
//! the span was created; and may call the `Subscriber`'s [`record`] method
Expand Down Expand Up @@ -126,7 +126,6 @@ use crate::Metadata;
/// should be used whenever possible.
///
/// </pre>
/// </div>
pub trait AsField: crate::sealed::Sealed {
/// Attempts to convert `&self` into a `Field` with the specified `metadata`.
///
Expand Down
2 changes: 1 addition & 1 deletion tracing/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ impl Span {
///
/// <pre class="ignore" style="white-space:normal;font:inherit;">
/// <strong>Note</strong>: The returned <a href="../struct.EnteredSpan.html">
/// <code>EnteredSpan</a></code> guard does not implement <code>Send</code>.
/// <code>EnteredSpan</code></a> guard does not implement <code>Send</code>.
/// Dropping the guard will exit <em>this</em> span, and if the guard is sent
/// to another thread and dropped there, that thread may never have entered
/// this span. Thus, <code>EnteredSpan</code>s should not be sent between threads.
Expand Down

0 comments on commit 8a8b19b

Please sign in to comment.