Skip to content

Commit 493412a

Browse files
committed
make it explicit that panicking aborts a transaction
1 parent efd5c46 commit 493412a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async fn example() -> anyhow::Result<()> {
6868
})
6969
.await?;
7070

71-
// If we return `Err` from a transaction, then it will abort
71+
// If we return `Err` (or panic) from a transaction, then it will abort
7272
db.transaction(&["store"])
7373
.rw()
7474
.run(|t| async move {

examples/basic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async fn example() -> anyhow::Result<()> {
4747
})
4848
.await?;
4949

50-
// If we return `Err` from a transaction, then it will abort
50+
// If we return `Err` (or panic) from a transaction, then it will abort
5151
db.transaction(&["store"])
5252
.rw()
5353
.run(|t| async move {

0 commit comments

Comments
 (0)