File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,11 @@ pub struct Transaction<'a> {
4747/// committing - i.e., [`OnTransactionDrop::Commit`] - the transaction!
4848///
4949/// [1]: https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction
50- #[ derive( Debug , Copy , Clone ) ]
50+ #[ derive( Debug , Copy , Clone , Default ) ]
5151pub enum OnTransactionDrop {
5252 /// Abort the [`Transaction`] when it is dropped. This is the default
5353 /// behavior of [`Transaction`].
54+ #[ default]
5455 Abort ,
5556 /// Commit the [`Transaction`] when it is dropped. This is the default
5657 /// behavior of an [`IDBTransaction`][1] in JavaScript.
@@ -87,7 +88,7 @@ impl<'a> Transaction<'a> {
8788 Self {
8889 listeners : TxListeners :: new ( db, inner) ,
8990 done : false ,
90- on_drop : OnTransactionDrop :: Abort ,
91+ on_drop : OnTransactionDrop :: default ( ) ,
9192 }
9293 }
9394
You can’t perform that action at this time.
0 commit comments