mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-29 05:52:37 +00:00
chore: fix Rust 1.86.0 lints (#3253)
There was a single case of the new [`clippy::double_ended_iterator_last`] lint which was triggered in `tracing-attributes` and needed to be fixed. There were also a number of cases of incorrectly indented lines, caught in [`clippy::doc_overindented_list_items`]. [`clippy::double_ended_iterator_last`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [`clippy::doc_overindented_list_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
This commit is contained in:
parent
f341d53190
commit
f006df25b4
@ -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)
|
||||
|
@ -25,15 +25,15 @@
|
||||
//! features with other crates in the asynchronous ecosystem:
|
||||
//!
|
||||
//! - `tokio`: Enables compatibility with the `tokio` crate, including
|
||||
//! [`Instrument`] and [`WithSubscriber`] implementations for
|
||||
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
|
||||
//! `tokio::runtime::current_thread`. Enabled by default.
|
||||
//! [`Instrument`] and [`WithSubscriber`] implementations for
|
||||
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
|
||||
//! `tokio::runtime::current_thread`. Enabled by default.
|
||||
//! - `tokio-executor`: Enables compatibility with the `tokio-executor`
|
||||
//! crate, including [`Instrument`] and [`WithSubscriber`]
|
||||
//! 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 [`WithSubscriber`]
|
||||
//! 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.
|
||||
|
14
tracing-subscriber/src/filter/env/mod.rs
vendored
14
tracing-subscriber/src/filter/env/mod.rs
vendored
@ -56,16 +56,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 (`[{<FIELD NAME>=<FIELD_VALUE>}]=...`) matches a
|
||||
|
@ -135,7 +135,7 @@ impl FilterMap {
|
||||
/// 2. If all the bits are set, then every per-layer 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<FilterMap>,
|
||||
|
@ -442,22 +442,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:
|
||||
|
@ -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.
|
||||
@ -570,22 +570,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:
|
||||
|
@ -710,7 +710,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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user