Skip to content

Commit 2b7323c

Browse files
committed
Use the commit method in readme
1 parent 8c7e8c5 commit 2b7323c

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@ The `transaction` method will start a new transaction. It returns a
131131
transaction:
132132
```rust
133133
let trans = try!(conn.transaction());
134+
134135
try!(trans.execute(...));
135136
let stmt = try!(trans.prepare(...));
137+
// ...
136138

137-
if the_coast_is_clear {
138-
trans.set_commit();
139-
}
140-
141-
try!(trans.finish());
139+
try!(trans.commit());
142140
```
143141
The transaction will be active until the `Transaction` object falls out of
144142
scope. A transaction will roll back by default. Nested transactions are

0 commit comments

Comments
 (0)