Skip to content

Commit 82f24bf

Browse files
committed
fix formatting
1 parent 5c3447c commit 82f24bf

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/client/pool.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@ pub trait Key: Eq + Hash + Clone + Debug + Unpin + Send + 'static {}
4747

4848
impl<T> Key for T where T: Eq + Hash + Clone + Debug + Unpin + Send + 'static {}
4949

50-
type OldKey = (http::uri::Scheme, http::uri::Authority);
51-
52-
fn assert() {
53-
let x: OldKey = (http::uri::Scheme::HTTP, "x".parse().expect("host key"));
54-
test(x);
55-
}
56-
fn test<T: Key>(a: T) {
57-
}
58-
59-
// impl Key for OldKey {}
60-
6150
/// When checking out a pooled connection, it might be that the connection
6251
/// only supports a single reservation, or it might be usable for many.
6352
///
@@ -810,18 +799,18 @@ impl<T> WeakOpt<T> {
810799

811800
#[cfg(all(test, not(miri)))]
812801
mod tests {
802+
use std::fmt::Debug;
813803
use std::future::Future;
804+
use std::hash::Hash;
814805
use std::pin::Pin;
815806
use std::task::{self, Poll};
816807
use std::time::Duration;
817-
use std::fmt::{self, Debug};
818-
use std::hash::Hash;
819808

820-
use super::{Connecting, Pool, Poolable, Reservation, WeakOpt, Key};
809+
use super::{Connecting, Key, Pool, Poolable, Reservation, WeakOpt};
821810
use crate::common::exec::Exec;
822811

823812
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
824-
struct KeyImpl (http::uri::Scheme, http::uri::Authority);
813+
struct KeyImpl(http::uri::Scheme, http::uri::Authority);
825814

826815
type KeyTuple = (http::uri::Scheme, http::uri::Authority);
827816

@@ -852,7 +841,6 @@ mod tests {
852841

853842
fn host_key(s: &str) -> KeyImpl {
854843
KeyImpl(http::uri::Scheme::HTTP, s.parse().expect("host key"))
855-
856844
}
857845

858846
fn pool_no_timer<T, K: Key>() -> Pool<T, K> {

0 commit comments

Comments
 (0)