-
Notifications
You must be signed in to change notification settings - Fork 848
Closed
Labels
crate/tracingRelated to the `tracing` crateRelated to the `tracing` cratekind/featureNew feature or requestNew feature or request
Description
Feature Request
Motivation
It is a common case to create a span, enter it right away, and then never use it again.
Proposal
Provide a method on span into_enter which is the same as the current enter but consumes self rather than taking a reference to it. This would allow the following code:
let _myspan_enter = info_span!("myspan").into_enter();
...as opposed to the currently required:
let myspan = info_span!("myspan");
let _myspan_enter = myspan.enter();Metadata
Metadata
Assignees
Labels
crate/tracingRelated to the `tracing` crateRelated to the `tracing` cratekind/featureNew feature or requestNew feature or request