Skip to content

Commit 2c4f3d1

Browse files
committed
uh oh
1 parent ea5c7b5 commit 2c4f3d1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/examples/echo.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
116116
info!(message = "echo'd data", %peer_addr, size = n);
117117
}
118118
})
119-
.instrument(info_span!("echo", %peer_addr));
119+
.instrument(info_span!("echo", %peer_addr))
120+
.await?;
120121
}
121122
}

tracing/src/instrument.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ pub trait WithSubscriber: Sized {
123123
pin_project! {
124124
/// A future that has been instrumented with a `tracing` subscriber.
125125
#[derive(Clone, Debug)]
126+
#[must_use = "futures do nothing unless you `.await` or poll them"]
126127
pub struct WithDispatch<T> {
127128
#[pin]
128129
inner: T,
@@ -133,6 +134,7 @@ pin_project! {
133134
pin_project! {
134135
/// A future that has been instrumented with a `tracing` span.
135136
#[derive(Debug, Clone)]
137+
#[must_use = "futures do nothing unless you `.await` or poll them"]
136138
pub struct Instrumented<T> {
137139
#[pin]
138140
inner: T,

0 commit comments

Comments
 (0)