mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-19 12:29:34 +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::os::raw::c_int;
|
||||
|
||||
/// Error Codes
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ErrorCode {
|
||||
/// Internal logic error in SQLite
|
||||
InternalMalfunction,
|
||||
|
@@ -17,6 +17,7 @@ pub fn SQLITE_TRANSIENT() -> sqlite3_destructor_type {
|
||||
|
||||
/// Run-Time Limit Categories
|
||||
#[repr(i32)]
|
||||
#[non_exhaustive]
|
||||
pub enum Limit {
|
||||
/// The maximum size of any string or BLOB or table row, in bytes.
|
||||
SQLITE_LIMIT_LENGTH = SQLITE_LIMIT_LENGTH,
|
||||
|
Reference in New Issue
Block a user