mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-16 20:52:19 +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:
@@ -638,6 +638,7 @@ impl Connection {
|
||||
/// `feature = "session"` Constants passed to the conflict handler
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ConflictType {
|
||||
UNKNOWN = -1,
|
||||
SQLITE_CHANGESET_DATA = ffi::SQLITE_CHANGESET_DATA,
|
||||
@@ -662,6 +663,7 @@ impl From<i32> for ConflictType {
|
||||
/// `feature = "session"` Constants returned by the conflict handler
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ConflictAction {
|
||||
SQLITE_CHANGESET_OMIT = ffi::SQLITE_CHANGESET_OMIT,
|
||||
SQLITE_CHANGESET_REPLACE = ffi::SQLITE_CHANGESET_REPLACE,
|
||||
|
Reference in New Issue
Block a user