Skip to content

Commit

Permalink
chore: Fix typos (tokio-rs#1740)
Browse files Browse the repository at this point in the history
  • Loading branch information
walfie authored Nov 22, 2021
1 parent f1aa0d4 commit 500021c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ use std::{error::Error, io};
use tracing::{debug, error, info, span, warn, Level};

// the `#[tracing::instrument]` attribute creates and enters a span
// every time the instrumented function is called. The span is named after the
// every time the instrumented function is called. The span is named after
// the function or method. Parameters passed to the function are recorded as fields.
#[tracing::instrument]
pub fn shave(yak: usize) -> Result<(), Box<dyn Error + 'static>> {
Expand Down
4 changes: 2 additions & 2 deletions examples/examples/fmt/yak_shave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use thiserror::Error;
use tracing::{debug, error, info, span, trace, warn, Level};

// the `#[tracing::instrument]` attribute creates and enters a span
// every time the instrumented function is called. The span is named after the
// every time the instrumented function is called. The span is named after
// the function or method. Paramaters passed to the function are recorded as fields.
#[tracing::instrument]
pub fn shave(yak: usize) -> Result<(), Box<dyn Error + 'static>> {
Expand Down Expand Up @@ -47,7 +47,7 @@ pub fn shave_all(yaks: usize) -> usize {

if let Err(ref error) = res {
// Like spans, events can also use the field initialization shorthand.
// In this instance, `yak` is the field being initalized.
// In this instance, `yak` is the field being initialized.
error!(yak, error = error.as_ref(), "failed to shave yak");
} else {
yaks_shaved += 1;
Expand Down
2 changes: 1 addition & 1 deletion tracing-appender/src/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl InnerAppender {
}

fn should_rollover(&self, date: OffsetDateTime) -> bool {
// the `None` case means that the `InnerAppender` *never* rorates log files.
// the `None` case means that the `InnerAppender` *never* rotates log files.
match self.next_date {
None => false,
Some(next_date) => date >= next_date,
Expand Down
2 changes: 1 addition & 1 deletion tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ use std::{error::Error, io};
use tracing::{debug, error, info, span, warn, Level};

// the `#[tracing::instrument]` attribute creates and enters a span
// every time the instrumented function is called. The span is named after the
// every time the instrumented function is called. The span is named after
// the function or method. Paramaters passed to the function are recorded as fields.
#[tracing::instrument]
pub fn shave(yak: usize) -> Result<(), Box<dyn Error + 'static>> {
Expand Down
4 changes: 2 additions & 2 deletions tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
//! use tracing::{debug, error, info, span, warn, Level};
//!
//! // the `#[tracing::instrument]` attribute creates and enters a span
//! // every time the instrumented function is called. The span is named after the
//! // every time the instrumented function is called. The span is named after
//! // the function or method. Parameters passed to the function are recorded as fields.
//! #[tracing::instrument]
//! pub fn shave(yak: usize) -> Result<(), Box<dyn Error + 'static>> {
Expand Down Expand Up @@ -524,7 +524,7 @@
//!
//! if let Err(ref error) = res {
//! // Like spans, events can also use the field initialization shorthand.
//! // In this instance, `yak` is the field being initalized.
//! // In this instance, `yak` is the field being initialized.
//! error!(yak, error = error.as_ref(), "failed to shave yak!");
//! } else {
//! yaks_shaved += 1;
Expand Down
2 changes: 1 addition & 1 deletion tracing/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ impl Span {
/// ```
///
/// If the current [collector] enables the [`DEBUG`] level, then both
/// the "parent" and "child" spans will be enabled. Thus, when the "spawaned
/// the "parent" and "child" spans will be enabled. Thus, when the "spawned
/// a thread!" event occurs, it will be inside of the "child" span. Because
/// "parent" is the parent of "child", the event will _also_ be inside of
/// "parent".
Expand Down

0 comments on commit 500021c

Please sign in to comment.