mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-19 06:18:56 +08:00
Add #[non_exhaustive]
to enums that might get new variants. (#673)
This just using them in patterns without a catchall. I left things alone that seem very unlikely to change (`Value`, `ValueRef`, `DatabaseName`, etc...). This might help reduce the number of breaking changes we need (rusqlite is still pre-1.0 so it doesn't really matter that much, but breaking changes complicate the story around when we can cut releases).
This commit is contained in:
@@ -4,6 +4,7 @@ use std::ops::Deref;
|
||||
/// Options for transaction behavior. See [BEGIN
|
||||
/// TRANSACTION](http://www.sqlite.org/lang_transaction.html) for details.
|
||||
#[derive(Copy, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub enum TransactionBehavior {
|
||||
Deferred,
|
||||
Immediate,
|
||||
@@ -12,6 +13,7 @@ pub enum TransactionBehavior {
|
||||
|
||||
/// Options for how a Transaction or Savepoint should behave when it is dropped.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[non_exhaustive]
|
||||
pub enum DropBehavior {
|
||||
/// Roll back the changes. This is the default.
|
||||
Rollback,
|
||||
|
Reference in New Issue
Block a user