Skip to content

Commit d83c01c

Browse files
committed
fixing clippy checks on overindentation and on .next_back() replacing .last()
1 parent 144982d commit d83c01c

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed

tracing-attributes/src/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ impl RecordType {
453453
if path
454454
.segments
455455
.iter()
456-
.last()
456+
.next_back()
457457
.map(|path_segment| {
458458
let ident = path_segment.ident.to_string();
459459
Self::TYPES_FOR_VALUE.iter().any(|&t| t == ident)

tracing-futures/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
//! features with other crates in the asynchronous ecosystem:
2626
//!
2727
//! - `tokio`: Enables compatibility with the `tokio` crate, including
28-
//! [`Instrument`] and [`WithSubscriber`] implementations for
29-
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
30-
//! `tokio::runtime::current_thread`. Enabled by default.
28+
//! [`Instrument`] and [`WithSubscriber`] implementations for
29+
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
30+
//! `tokio::runtime::current_thread`. Enabled by default.
3131
//! - `tokio-executor`: Enables compatibility with the `tokio-executor`
32-
//! crate, including [`Instrument`] and [`WithSubscriber`]
33-
//! implementations for types implementing `tokio_executor::Executor`.
34-
//! This is intended primarily for use in crates which depend on
35-
//! `tokio-executor` rather than `tokio`; in general the `tokio` feature
36-
//! should be used instead.
32+
//! crate, including [`Instrument`] and [`WithSubscriber`]
33+
//! implementations for types implementing `tokio_executor::Executor`.
34+
//! This is intended primarily for use in crates which depend on
35+
//! `tokio-executor` rather than `tokio`; in general the `tokio` feature
36+
//! should be used instead.
3737
//! - `std-future`: Enables compatibility with `std::future::Future`.
3838
//! - `futures-01`: Enables compatibility with version 0.1.x of the [`futures`]
3939
//! crate.

tracing-subscriber/src/filter/env/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ use tracing_core::{
5656
/// Each component (`target`, `span`, `field`, `value`, and `level`) will be covered in turn.
5757
///
5858
/// - `target` matches the event or span's target. In general, this is the module path and/or crate name.
59-
/// Examples of targets `h2`, `tokio::net`, or `tide::server`. For more information on targets,
60-
/// please refer to [`Metadata`]'s documentation.
59+
/// Examples of targets `h2`, `tokio::net`, or `tide::server`. For more information on targets,
60+
/// please refer to [`Metadata`]'s documentation.
6161
/// - `span` matches on the span's name. If a `span` directive is provided alongside a `target`,
62-
/// the `span` directive will match on spans _within_ the `target`.
62+
/// the `span` directive will match on spans _within_ the `target`.
6363
/// - `field` matches on [fields] within spans. Field names can also be supplied without a `value`
64-
/// and will match on any [`Span`] or [`Event`] that has a field with that name.
65-
/// For example: `[span{field=\"value\"}]=debug`, `[{field}]=trace`.
64+
/// and will match on any [`Span`] or [`Event`] that has a field with that name.
65+
/// For example: `[span{field=\"value\"}]=debug`, `[{field}]=trace`.
6666
/// - `value` matches on the value of a span's field. If a value is a numeric literal or a bool,
67-
/// it will match _only_ on that value. Otherwise, this filter matches the
68-
/// [`std::fmt::Debug`] output from the value.
67+
/// it will match _only_ on that value. Otherwise, this filter matches the
68+
/// [`std::fmt::Debug`] output from the value.
6969
/// - `level` sets a maximum verbosity level accepted by this directive.
7070
///
7171
/// When a field value directive (`[{<FIELD NAME>=<FIELD_VALUE>}]=...`) matches a

tracing-subscriber/src/filter/layer_filters/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl FilterMap {
135135
/// 2. If all the bits are set, then every per-layer filter has decided it
136136
/// doesn't want to enable that span or event. In that case, the
137137
/// `Registry`'s `enabled` method will return `false`, so that
138-
/// recording a span or event can be skipped entirely.
138+
/// recording a span or event can be skipped entirely.
139139
#[derive(Debug)]
140140
pub(crate) struct FilterState {
141141
enabled: Cell<FilterMap>,

tracing-subscriber/src/fmt/fmt_layer.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -442,22 +442,22 @@ where
442442
/// The following options are available:
443443
///
444444
/// - `FmtSpan::NONE`: No events will be synthesized when spans are
445-
/// created, entered, exited, or closed. Data from spans will still be
446-
/// included as the context for formatted events. This is the default.
445+
/// created, entered, exited, or closed. Data from spans will still be
446+
/// included as the context for formatted events. This is the default.
447447
/// - `FmtSpan::NEW`: An event will be synthesized when spans are created.
448448
/// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered.
449449
/// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited.
450450
/// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If
451-
/// [timestamps are enabled][time] for this formatter, the generated
452-
/// event will contain fields with the span's _busy time_ (the total
453-
/// time for which it was entered) and _idle time_ (the total time that
454-
/// the span existed but was not entered).
451+
/// [timestamps are enabled][time] for this formatter, the generated
452+
/// event will contain fields with the span's _busy time_ (the total
453+
/// time for which it was entered) and _idle time_ (the total time that
454+
/// the span existed but was not entered).
455455
/// - `FmtSpan::ACTIVE`: Events will be synthesized when spans are entered
456-
/// or exited.
456+
/// or exited.
457457
/// - `FmtSpan::FULL`: Events will be synthesized whenever a span is
458-
/// created, entered, exited, or closed. If timestamps are enabled, the
459-
/// close event will contain the span's busy and idle time, as
460-
/// described above.
458+
/// created, entered, exited, or closed. If timestamps are enabled, the
459+
/// close event will contain the span's busy and idle time, as
460+
/// described above.
461461
///
462462
/// The options can be enabled in any combination. For instance, the following
463463
/// will synthesize events whenever spans are created and closed:

tracing-subscriber/src/fmt/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
//!
3737
//! For example:
3838
//! - Setting `RUST_LOG=debug` enables all `Span`s and `Event`s
39-
//! set to the log level `DEBUG` or higher
39+
//! set to the log level `DEBUG` or higher
4040
//! - Setting `RUST_LOG=my_crate=trace` enables `Span`s and `Event`s
41-
//! in `my_crate` at all log levels
41+
//! in `my_crate` at all log levels
4242
//!
4343
//! **Note**: This should **not** be called by libraries. Libraries should use
4444
//! [`tracing`] to publish `tracing` `Event`s.
@@ -570,22 +570,22 @@ where
570570
/// The following options are available:
571571
///
572572
/// - `FmtSpan::NONE`: No events will be synthesized when spans are
573-
/// created, entered, exited, or closed. Data from spans will still be
574-
/// included as the context for formatted events. This is the default.
573+
/// created, entered, exited, or closed. Data from spans will still be
574+
/// included as the context for formatted events. This is the default.
575575
/// - `FmtSpan::NEW`: An event will be synthesized when spans are created.
576576
/// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered.
577577
/// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited.
578578
/// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If
579-
/// [timestamps are enabled][time] for this formatter, the generated
580-
/// event will contain fields with the span's _busy time_ (the total
581-
/// time for which it was entered) and _idle time_ (the total time that
582-
/// the span existed but was not entered).
579+
/// [timestamps are enabled][time] for this formatter, the generated
580+
/// event will contain fields with the span's _busy time_ (the total
581+
/// time for which it was entered) and _idle time_ (the total time that
582+
/// the span existed but was not entered).
583583
/// - `FmtSpan::ACTIVE`: An event will be synthesized when spans are entered
584-
/// or exited.
584+
/// or exited.
585585
/// - `FmtSpan::FULL`: Events will be synthesized whenever a span is
586-
/// created, entered, exited, or closed. If timestamps are enabled, the
587-
/// close event will contain the span's busy and idle time, as
588-
/// described above.
586+
/// created, entered, exited, or closed. If timestamps are enabled, the
587+
/// close event will contain the span's busy and idle time, as
588+
/// described above.
589589
///
590590
/// The options can be enabled in any combination. For instance, the following
591591
/// will synthesize events whenever spans are created and closed:

tracing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@
710710
//! `tracing-subscriber`'s `FmtSubscriber`, you don't need to depend on
711711
//! `tracing-log` directly.
712712
//! - [`tracing-appender`] provides utilities for outputting tracing data,
713-
//! including a file appender and non blocking writer.
713+
//! including a file appender and non blocking writer.
714714
//!
715715
//! Additionally, there are also several third-party crates which are not
716716
//! maintained by the `tokio` project. These include:

0 commit comments

Comments
 (0)