mirror of
https://github.com/tower-rs/tower.git
synced 2025-09-28 13:30:43 +00:00
fix warnings found when running check/doc commands (#779)
Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
This commit is contained in:
parent
a6e98a7d69
commit
88a7d3e01e
@ -8,11 +8,11 @@ edition = "2018"
|
||||
# [dependencies] instead.
|
||||
[dev-dependencies]
|
||||
tower = { version = "0.4", path = "../tower", features = ["full"] }
|
||||
tower-service = "0.3"
|
||||
tower-service = "0.3"
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
rand = "0.8"
|
||||
pin-project = "1.0"
|
||||
futures = "0.3"
|
||||
futures = "0.3.22"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.2"
|
||||
hdrhistogram = "7"
|
||||
|
@ -25,4 +25,4 @@ edition = "2018"
|
||||
http = "0.2"
|
||||
tower-layer = { version = "0.3", path = "../tower-layer" }
|
||||
tokio = { version = "1", features = ["macros", "time"] }
|
||||
futures = "0.3"
|
||||
futures = "0.3.22"
|
||||
|
@ -81,7 +81,7 @@ pin-project-lite = { version = "0.2.7", optional = true }
|
||||
sync_wrapper = { version = "0.1.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
futures = "0.3"
|
||||
futures = "0.3.22"
|
||||
hdrhistogram = { version = "7.0", default-features = false }
|
||||
pin-project-lite = "0.2.7"
|
||||
tokio = { version = "1.6.2", features = ["macros", "sync", "test-util", "rt-multi-thread"] }
|
||||
|
@ -22,7 +22,7 @@
|
||||
//! response or an error. This abstraction can be used to model both clients and
|
||||
//! servers.
|
||||
//!
|
||||
//! Generic components, like [timeouts], [rate limiting], and [load balancing],
|
||||
//! Generic components, like [`timeout`], [rate limiting], and [load balancing],
|
||||
//! can be modeled as [`Service`]s that wrap some inner service and apply
|
||||
//! additional behavior before or after the inner service is called. This allows
|
||||
//! implementing these components in a protocol-agnostic, composable way. Typically,
|
||||
@ -130,7 +130,7 @@
|
||||
//! ```
|
||||
//!
|
||||
//! Alternatively, you can only enable some features. For example, to enable
|
||||
//! only the [`retry`] and [`timeout`][timeouts] middleware, write:
|
||||
//! only the [`retry`] and [`timeout`] middleware, write:
|
||||
//!
|
||||
//! ```toml
|
||||
//! tower = { version = "0.4", features = ["retry", "timeout"] }
|
||||
@ -148,7 +148,6 @@
|
||||
//!
|
||||
//! [`Service`]: crate::Service
|
||||
//! [`Layer`]: crate::Layer
|
||||
//! [timeouts]: crate::timeout
|
||||
//! [rate limiting]: crate::limit::rate
|
||||
//! [load balancing]: crate::balance
|
||||
//! [`ServiceBuilder`]: crate::ServiceBuilder
|
||||
|
@ -45,6 +45,7 @@ pub struct Count(usize);
|
||||
|
||||
/// Tracks an in-flight request by reference count.
|
||||
#[derive(Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub struct Handle(RefCount);
|
||||
|
||||
// ===== impl PendingRequests =====
|
||||
|
@ -168,7 +168,7 @@ impl<F: Future> common::Drive<F> for FuturesOrdered<F> {
|
||||
}
|
||||
|
||||
fn push(&mut self, future: F) {
|
||||
FuturesOrdered::push(self, future)
|
||||
FuturesOrdered::push_back(self, future)
|
||||
}
|
||||
|
||||
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Option<F::Output>> {
|
||||
|
@ -174,7 +174,7 @@ mod tests {
|
||||
let mut r = HasherRng::default();
|
||||
match super::sample_floyd2(&mut r, 2) {
|
||||
[0, 1] | [1, 0] => (),
|
||||
err => panic!("{err:?}"),
|
||||
array => panic!("unexpected inplace boundaries: {:?}", array),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user