-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add example for using instrument macro with pinned future #3045
base: master
Are you sure you want to change the base?
Conversation
735e405
to
3a2bbb6
Compare
3a2bbb6
to
3cc1b7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two small nits:
- I think we can hide the
use tracing::Instrument
import as well. - Instead of referring to
std::pin
, maybestd::pin::Pin
(the struct) would be better.
If you think it's not important I can remove it, but in my opinion it would be better to mention where Of course if the person reading copy-pastes/duplicates thit example into their code they will get an error to include the trait, so for this case it probably does not matter.
My initial choice for the Tell me what you think @kaffarell, and I'll change it to whatever you think is better. |
Of course if the person reading copy-pastes/duplicates thit example into their code they will get an error to include the trait, so for this case it probably does not matter. No hard feelings here, so I'm also good with leaving it.
Actually LGTM. |
This change is motivated by a stackoverflow question.