Skip to content

Commit d5bc7d2

Browse files
committed
api: move trivial state() getter down
1 parent 8853b62 commit d5bc7d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bb8/src/api.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ impl<M: ManageConnection> Pool<M> {
4848
self.inner.connect().await
4949
}
5050

51-
/// Returns information about the current state of the pool.
52-
pub fn state(&self) -> State {
53-
self.inner.state()
54-
}
55-
5651
/// Adds a connection to the pool.
5752
///
5853
/// If the connection is broken, or the pool is at capacity, the
5954
/// connection is not added and instead returned to the caller in Err.
6055
pub fn add(&self, conn: M::Connection) -> Result<(), AddError<M::Connection>> {
6156
self.inner.try_put(conn)
6257
}
58+
59+
/// Returns information about the current state of the pool.
60+
pub fn state(&self) -> State {
61+
self.inner.state()
62+
}
6363
}
6464

6565
impl<M: ManageConnection> Clone for Pool<M> {

0 commit comments

Comments
 (0)