Skip to content

Commit 18cfda0

Browse files
committed
fixing clippy checks on overindentation and on .next_back() replacing .last()
1 parent 23e0491 commit 18cfda0

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
//! features with other crates in the asynchronous ecosystem:
2626
//!
2727
//! - `tokio`: Enables compatibility with the `tokio` 0.1 crate, including
28-
//! [`Instrument`] and [`WithCollector`] implementations for
29-
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
30-
//! `tokio::runtime::current_thread`. This is not needed for compatibility
31-
//! with `tokio` v1.
28+
//! [`Instrument`] and [`WithCollector`] implementations for
29+
//! `tokio::executor::Executor`, `tokio::runtime::Runtime`, and
30+
//! `tokio::runtime::current_thread`. This is not needed for compatibility
31+
//! with `tokio` v1.
3232
//! - `tokio-executor`: Enables compatibility with the `tokio-executor`
33-
//! crate, including [`Instrument`] and [`WithCollector`]
34-
//! implementations for types implementing `tokio_executor::Executor`.
35-
//! This is intended primarily for use in crates which depend on
36-
//! `tokio-executor` rather than `tokio`; in general the `tokio` feature
37-
//! should be used instead.
33+
//! crate, including [`Instrument`] and [`WithCollector`]
34+
//! implementations for types implementing `tokio_executor::Executor`.
35+
//! This is intended primarily for use in crates which depend on
36+
//! `tokio-executor` rather than `tokio`; in general the `tokio` feature
37+
//! should be used instead.
3838
//! - `std-future`: Enables compatibility with `std::future::Future`.
3939
//! - `futures-01`: Enables compatibility with version 0.1.x of the [`futures`]
4040
//! crate.

tracing-subscriber/src/filter/subscriber_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-subscriber 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_subscriber.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,22 +441,22 @@ where
441441
/// The following options are available:
442442
///
443443
/// - `FmtSpan::NONE`: No events will be synthesized when spans are
444-
/// created, entered, exited, or closed. Data from spans will still be
445-
/// included as the context for formatted events. This is the default.
444+
/// created, entered, exited, or closed. Data from spans will still be
445+
/// included as the context for formatted events. This is the default.
446446
/// - `FmtSpan::NEW`: An event will be synthesized when spans are created.
447447
/// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered.
448448
/// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited.
449449
/// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If
450-
/// [timestamps are enabled][time] for this formatter, the generated
451-
/// event will contain fields with the span's _busy time_ (the total
452-
/// time for which it was entered) and _idle time_ (the total time that
453-
/// the span existed but was not entered).
450+
/// [timestamps are enabled][time] for this formatter, the generated
451+
/// event will contain fields with the span's _busy time_ (the total
452+
/// time for which it was entered) and _idle time_ (the total time that
453+
/// the span existed but was not entered).
454454
/// - `FmtSpan::ACTIVE`: Events will be synthesized when spans are entered
455-
/// or exited.
455+
/// or exited.
456456
/// - `FmtSpan::FULL`: Events will be synthesized whenever a span is
457-
/// created, entered, exited, or closed. If timestamps are enabled, the
458-
/// close event will contain the span's busy and idle time, as
459-
/// described above.
457+
/// created, entered, exited, or closed. If timestamps are enabled, the
458+
/// close event will contain the span's busy and idle time, as
459+
/// described above.
460460
///
461461
/// The options can be enabled in any combination. For instance, the following
462462
/// 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.
@@ -568,22 +568,22 @@ where
568568
/// The following options are available:
569569
///
570570
/// - `FmtSpan::NONE`: No events will be synthesized when spans are
571-
/// created, entered, exited, or closed. Data from spans will still be
572-
/// included as the context for formatted events. This is the default.
571+
/// created, entered, exited, or closed. Data from spans will still be
572+
/// included as the context for formatted events. This is the default.
573573
/// - `FmtSpan::NEW`: An event will be synthesized when spans are created.
574574
/// - `FmtSpan::ENTER`: An event will be synthesized when spans are entered.
575575
/// - `FmtSpan::EXIT`: An event will be synthesized when spans are exited.
576576
/// - `FmtSpan::CLOSE`: An event will be synthesized when a span closes. If
577-
/// [timestamps are enabled][time] for this formatter, the generated
578-
/// event will contain fields with the span's _busy time_ (the total
579-
/// time for which it was entered) and _idle time_ (the total time that
580-
/// the span existed but was not entered).
577+
/// [timestamps are enabled][time] for this formatter, the generated
578+
/// event will contain fields with the span's _busy time_ (the total
579+
/// time for which it was entered) and _idle time_ (the total time that
580+
/// the span existed but was not entered).
581581
/// - `FmtSpan::ACTIVE`: An event will be synthesized when spans are entered
582-
/// or exited.
582+
/// or exited.
583583
/// - `FmtSpan::FULL`: Events will be synthesized whenever a span is
584-
/// created, entered, exited, or closed. If timestamps are enabled, the
585-
/// close event will contain the span's busy and idle time, as
586-
/// described above.
584+
/// created, entered, exited, or closed. If timestamps are enabled, the
585+
/// close event will contain the span's busy and idle time, as
586+
/// described above.
587587
///
588588
/// The options can be enabled in any combination. For instance, the following
589589
/// will synthesize events whenever spans are created and closed:

tracing-subscriber/src/subscribe/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,9 @@
570570
//!
571571
//! Consider the following:
572572
//! - `subscriber_a` and `subscriber_b`, which should only receive spans and events at
573-
//! the [`INFO`] [level] and above.
573+
//! the [`INFO`] [level] and above.
574574
//! - A third subscriber, `subscriber_c`, which should receive spans and events at
575-
//! the [`DEBUG`] [level] as well.
575+
//! the [`DEBUG`] [level] as well.
576576
//!
577577
//! The subscribers and filters would be composed thusly:
578578
//!

tracing/src/lib.rs

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

0 commit comments

Comments
 (0)