Skip to content

Commit

Permalink
chore: remove unused dev-dependencies (#2005)
Browse files Browse the repository at this point in the history
## Motivation

Remove unused dev-dependencies, and update documentation
examples to use `std::future`.
  • Loading branch information
name1e5s authored Mar 19, 2022
1 parent 4adc0a3 commit 44dc9f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 0 additions & 2 deletions tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ cfg-if = "1.0.0"
pin-project-lite = "0.2"

[dev-dependencies]
futures = "0.1"
criterion = { version = "0.3", default_features = false }
log = "0.4"
tokio = { version = "0.2.21", features = ["rt-core"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "^0.3"
Expand Down
14 changes: 8 additions & 6 deletions tracing/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,26 +182,27 @@
//! _closed_. Consider, for example, a future which has an associated
//! span and enters that span every time it is polled:
//! ```rust
//! # use futures::{Future, Poll, Async};
//! # use std::future::Future;
//! # use std::task::{Context, Poll};
//! # use std::pin::Pin;
//! struct MyFuture {
//! // data
//! span: tracing::Span,
//! }
//!
//! impl Future for MyFuture {
//! type Item = ();
//! type Error = ();
//! type Output = ();
//!
//! fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
//! fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Self::Output> {
//! let _enter = self.span.enter();
//! // Do actual future work...
//! # Ok(Async::Ready(()))
//! # Poll::Ready(())
//! }
//! }
//! ```
//!
//! If this future was spawned on an executor, it might yield one or more times
//! before `poll` returns `Ok(Async::Ready)`. If the future were to yield, then
//! before `poll` returns [`Poll::Ready`]. If the future were to yield, then
//! the executor would move on to poll the next future, which may _also_ enter
//! an associated span or series of spans. Therefore, it is valid for a span to
//! be entered repeatedly before it completes. Only the time when that span or
Expand Down Expand Up @@ -283,6 +284,7 @@
//! [fields]: super::field
//! [Metadata]: super::Metadata
//! [verbosity level]: super::Level
//! [`Poll::Ready`]: std::task::Poll::Ready
//! [`span!`]: super::span!
//! [`trace_span!`]: super::trace_span!
//! [`debug_span!`]: super::debug_span!
Expand Down

0 comments on commit 44dc9f5

Please sign in to comment.