diff --git a/tracing-attributes/src/expand.rs b/tracing-attributes/src/expand.rs index aa3719d9e1..b001409d35 100644 --- a/tracing-attributes/src/expand.rs +++ b/tracing-attributes/src/expand.rs @@ -453,7 +453,7 @@ impl RecordType { if path .segments .iter() - .last() + .next_back() .map(|path_segment| { let ident = path_segment.ident.to_string(); Self::TYPES_FOR_VALUE.iter().any(|&t| t == ident) diff --git a/tracing-futures/src/lib.rs b/tracing-futures/src/lib.rs index a49be5def9..5604721682 100644 --- a/tracing-futures/src/lib.rs +++ b/tracing-futures/src/lib.rs @@ -25,16 +25,16 @@ //! features with other crates in the asynchronous ecosystem: //! //! - `tokio`: Enables compatibility with the `tokio` 0.1 crate, including -//! [`Instrument`] and [`WithCollector`] implementations for -//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and -//! `tokio::runtime::current_thread`. This is not needed for compatibility -//! with `tokio` v1. +//! [`Instrument`] and [`WithCollector`] implementations for +//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and +//! `tokio::runtime::current_thread`. This is not needed for compatibility +//! with `tokio` v1. //! - `tokio-executor`: Enables compatibility with the `tokio-executor` -//! crate, including [`Instrument`] and [`WithCollector`] -//! implementations for types implementing `tokio_executor::Executor`. -//! This is intended primarily for use in crates which depend on -//! `tokio-executor` rather than `tokio`; in general the `tokio` feature -//! should be used instead. +//! crate, including [`Instrument`] and [`WithCollector`] +//! implementations for types implementing `tokio_executor::Executor`. +//! This is intended primarily for use in crates which depend on +//! `tokio-executor` rather than `tokio`; in general the `tokio` feature +//! should be used instead. //! - `std-future`: Enables compatibility with `std::future::Future`. //! - `futures-01`: Enables compatibility with version 0.1.x of the [`futures`] //! crate. diff --git a/tracing-subscriber/src/filter/env/mod.rs b/tracing-subscriber/src/filter/env/mod.rs index 4819e7936b..89dfe780ef 100644 --- a/tracing-subscriber/src/filter/env/mod.rs +++ b/tracing-subscriber/src/filter/env/mod.rs @@ -55,16 +55,16 @@ use tracing_core::{ /// Each component (`target`, `span`, `field`, `value`, and `level`) will be covered in turn. /// /// - `target` matches the event or span's target. In general, this is the module path and/or crate name. -/// Examples of targets `h2`, `tokio::net`, or `tide::server`. For more information on targets, -/// please refer to [`Metadata`]'s documentation. +/// Examples of targets `h2`, `tokio::net`, or `tide::server`. For more information on targets, +/// please refer to [`Metadata`]'s documentation. /// - `span` matches on the span's name. If a `span` directive is provided alongside a `target`, -/// the `span` directive will match on spans _within_ the `target`. +/// the `span` directive will match on spans _within_ the `target`. /// - `field` matches on [fields] within spans. Field names can also be supplied without a `value` -/// and will match on any [`Span`] or [`Event`] that has a field with that name. -/// For example: `[span{field=\"value\"}]=debug`, `[{field}]=trace`. +/// and will match on any [`Span`] or [`Event`] that has a field with that name. +/// For example: `[span{field=\"value\"}]=debug`, `[{field}]=trace`. /// - `value` matches on the value of a span's field. If a value is a numeric literal or a bool, -/// it will match _only_ on that value. Otherwise, this filter matches the -/// [`std::fmt::Debug`] output from the value. +/// it will match _only_ on that value. Otherwise, this filter matches the +/// [`std::fmt::Debug`] output from the value. /// - `level` sets a maximum verbosity level accepted by this directive. /// /// When a field value directive (`[{=}]=...`) matches a diff --git a/tracing-subscriber/src/filter/subscriber_filters/mod.rs b/tracing-subscriber/src/filter/subscriber_filters/mod.rs index f0449484c9..6c3f2d0b9e 100644 --- a/tracing-subscriber/src/filter/subscriber_filters/mod.rs +++ b/tracing-subscriber/src/filter/subscriber_filters/mod.rs @@ -135,7 +135,7 @@ impl FilterMap { /// 2. If all the bits are set, then every per-subscriber filter has decided it /// doesn't want to enable that span or event. In that case, the /// `Registry`'s `enabled` method will return `false`, so that -/// recording a span or event can be skipped entirely. +/// recording a span or event can be skipped entirely. #[derive(Debug)] pub(crate) struct FilterState { enabled: Cell, diff --git a/tracing-subscriber/src/fmt/fmt_subscriber.rs b/tracing-subscriber/src/fmt/fmt_subscriber.rs index eec4c32414..e3ecdd8025 100644 --- a/tracing-subscriber/src/fmt/fmt_subscriber.rs +++ b/tracing-subscriber/src/fmt/fmt_subscriber.rs @@ -441,22 +441,22 @@ where /// The following options are available: /// /// - `FmtSpan::NONE`: No events will be synthesized when spans are - /// created, entered, exited, or closed. Data from spans will still be - /// included as the context for formatted events. This is the default. + /// created, entered, exited, or closed. Data from spans will still be + /// included as the context for formatted events. This is the default. /// - `FmtSpan::NEW`: An event will be synthesized when spans are created. /// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered. /// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited. /// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If - /// [timestamps are enabled][time] for this formatter, the generated - /// event will contain fields with the span's _busy time_ (the total - /// time for which it was entered) and _idle time_ (the total time that - /// the span existed but was not entered). + /// [timestamps are enabled][time] for this formatter, the generated + /// event will contain fields with the span's _busy time_ (the total + /// time for which it was entered) and _idle time_ (the total time that + /// the span existed but was not entered). /// - `FmtSpan::ACTIVE`: Events will be synthesized when spans are entered - /// or exited. + /// or exited. /// - `FmtSpan::FULL`: Events will be synthesized whenever a span is - /// created, entered, exited, or closed. If timestamps are enabled, the - /// close event will contain the span's busy and idle time, as - /// described above. + /// created, entered, exited, or closed. If timestamps are enabled, the + /// close event will contain the span's busy and idle time, as + /// described above. /// /// The options can be enabled in any combination. For instance, the following /// will synthesize events whenever spans are created and closed: diff --git a/tracing-subscriber/src/fmt/mod.rs b/tracing-subscriber/src/fmt/mod.rs index 49e23e6007..1e3bfc359b 100644 --- a/tracing-subscriber/src/fmt/mod.rs +++ b/tracing-subscriber/src/fmt/mod.rs @@ -36,9 +36,9 @@ //! //! For example: //! - Setting `RUST_LOG=debug` enables all `Span`s and `Event`s -//! set to the log level `DEBUG` or higher +//! set to the log level `DEBUG` or higher //! - Setting `RUST_LOG=my_crate=trace` enables `Span`s and `Event`s -//! in `my_crate` at all log levels +//! in `my_crate` at all log levels //! //! **Note**: This should **not** be called by libraries. Libraries should use //! [`tracing`] to publish `tracing` `Event`s. @@ -568,22 +568,22 @@ where /// The following options are available: /// /// - `FmtSpan::NONE`: No events will be synthesized when spans are - /// created, entered, exited, or closed. Data from spans will still be - /// included as the context for formatted events. This is the default. + /// created, entered, exited, or closed. Data from spans will still be + /// included as the context for formatted events. This is the default. /// - `FmtSpan::NEW`: An event will be synthesized when spans are created. /// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered. /// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited. /// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If - /// [timestamps are enabled][time] for this formatter, the generated - /// event will contain fields with the span's _busy time_ (the total - /// time for which it was entered) and _idle time_ (the total time that - /// the span existed but was not entered). + /// [timestamps are enabled][time] for this formatter, the generated + /// event will contain fields with the span's _busy time_ (the total + /// time for which it was entered) and _idle time_ (the total time that + /// the span existed but was not entered). /// - `FmtSpan::ACTIVE`: An event will be synthesized when spans are entered - /// or exited. + /// or exited. /// - `FmtSpan::FULL`: Events will be synthesized whenever a span is - /// created, entered, exited, or closed. If timestamps are enabled, the - /// close event will contain the span's busy and idle time, as - /// described above. + /// created, entered, exited, or closed. If timestamps are enabled, the + /// close event will contain the span's busy and idle time, as + /// described above. /// /// The options can be enabled in any combination. For instance, the following /// will synthesize events whenever spans are created and closed: diff --git a/tracing-subscriber/src/subscribe/mod.rs b/tracing-subscriber/src/subscribe/mod.rs index ad420cd744..a2358ea433 100644 --- a/tracing-subscriber/src/subscribe/mod.rs +++ b/tracing-subscriber/src/subscribe/mod.rs @@ -570,9 +570,9 @@ //! //! Consider the following: //! - `subscriber_a` and `subscriber_b`, which should only receive spans and events at -//! the [`INFO`] [level] and above. +//! the [`INFO`] [level] and above. //! - A third subscriber, `subscriber_c`, which should receive spans and events at -//! the [`DEBUG`] [level] as well. +//! the [`DEBUG`] [level] as well. //! //! The subscribers and filters would be composed thusly: //! diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 95c226757c..cfc76a85c0 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -771,7 +771,7 @@ //! `tracing-subscriber`'s `FmtSubscriber`, you don't need to depend on //! `tracing-log` directly. //! - [`tracing-appender`] provides utilities for outputting tracing data, -//! including a file appender and non blocking writer. +//! including a file appender and non blocking writer. //! //! Additionally, there are also several third-party crates which are not //! maintained by the `tokio` project. These include: