Skip to content

Commit

Permalink
docs: fix function comment
Browse files Browse the repository at this point in the history
The comment on the `visit_spans` fn is wrong. Change it to the correct
order.

Fixes: tokio-rs#2940
  • Loading branch information
kaffarell committed Apr 22, 2024
1 parent 36bf063 commit a01924e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracing-subscriber/src/fmt/fmt_layer.rs
Expand Up @@ -1041,9 +1041,9 @@ where
{
/// Visits every span in the current context with a closure.
///
/// The provided closure will be called first with the current span,
/// and then with that span's parent, and then that span's parent,
/// and so on until a root span is reached.
/// The provided closure will be called first with the root span,
/// and then traverse through all the children until it reaches
/// the current one.
pub fn visit_spans<E, F>(&self, mut f: F) -> Result<(), E>
where
F: FnMut(&SpanRef<'_, S>) -> Result<(), E>,
Expand Down

0 comments on commit a01924e

Please sign in to comment.