Skip to content

tracing: fix "name / parent" variant of `event!`

852d536
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

tracing: fix "name / parent" variant of event! #3293

tracing: fix "name / parent" variant of `event!`
852d536
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy failed May 30, 2025 in 0s

clippy

1 error

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 0
Note 0
Help 0

Versions

  • rustc 1.87.0 (17067e9ac 2025-05-09)
  • cargo 1.87.0 (99624be96 2025-05-06)
  • clippy 0.1.87 (17067e9ac6 2025-05-09)

Annotations

Check failure on line 456 in tracing-attributes/src/expand.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator

error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
   --> tracing-attributes/src/expand.rs:453:20
    |
453 |                   if path
    |  ____________________^
454 | |                     .segments
455 | |                     .iter()
456 | |                     .last()
    | |______________________-----^
    |                        |
    |                        help: try: `next_back()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
    = note: `-D clippy::double-ended-iterator-last` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::double_ended_iterator_last)]`