Run rustfmt

This commit is contained in:
Ryan Leckey 2020-01-15 00:27:19 -08:00
parent 0fdc4c4761
commit 6ddf3184de
2 changed files with 6 additions and 9 deletions

View File

@ -1,8 +1,7 @@
//! **Pool** for SQLx database connections.
use std::{
fmt,
mem,
fmt, mem,
ops::{Deref, DerefMut},
sync::Arc,
time::{Duration, Instant},

View File

@ -4,10 +4,10 @@ use async_std::task;
use futures_core::future::BoxFuture;
use futures_core::stream::BoxStream;
use crate::connection::Connection;
use crate::database::Database;
use crate::describe::Describe;
use crate::executor::Executor;
use crate::connection::Connection;
pub struct Transaction<T>
where
@ -96,15 +96,13 @@ where
}
}
impl<T> Connection for Transaction<T>
where
T: Connection
impl<T> Connection for Transaction<T>
where
T: Connection,
{
// Close is equivalent to ROLLBACK followed by CLOSE
fn close(self) -> BoxFuture<'static, crate::Result<()>> {
Box::pin(async move {
self.rollback().await?.close().await
})
Box::pin(async move { self.rollback().await?.close().await })
}
}