[ci skip] Fix Transaction doc

This commit is contained in:
gwenn 2018-09-05 18:08:39 +02:00 committed by GitHub
parent b1fdc84dc9
commit d6b6058849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,9 +98,9 @@ pub struct Savepoint<'conn> {
impl<'conn> Transaction<'conn> { impl<'conn> Transaction<'conn> {
/// Begin a new transaction. Cannot be nested; see `savepoint` for nested /// Begin a new transaction. Cannot be nested; see `savepoint` for nested
/// transactions. /// transactions.
// Even though we don't mutate the connection, we take a `&mut Connection` /// Even though we don't mutate the connection, we take a `&mut Connection`
// so as to prevent nested or concurrent transactions on the same /// so as to prevent nested or concurrent transactions on the same
// connection. /// connection.
pub fn new(conn: &mut Connection, behavior: TransactionBehavior) -> Result<Transaction> { pub fn new(conn: &mut Connection, behavior: TransactionBehavior) -> Result<Transaction> {
let query = match behavior { let query = match behavior {
TransactionBehavior::Deferred => "BEGIN DEFERRED", TransactionBehavior::Deferred => "BEGIN DEFERRED",