mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-31 05:48: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::fmt;
|
||||
|
||||
/// Enum listing possible errors from `FromSql` trait.
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum FromSqlError {
|
||||
/// Error when an SQLite value is requested, but the type of the result
|
||||
/// cannot be converted to the requested Rust type.
|
||||
|
||||
@@ -7,6 +7,7 @@ use std::borrow::Cow;
|
||||
/// `ToSqlOutput` represents the possible output types for implementors of the
|
||||
/// `ToSql` trait.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ToSqlOutput<'a> {
|
||||
/// A borrowed SQLite-representable value.
|
||||
Borrowed(ValueRef<'a>),
|
||||
|
||||
Reference in New Issue
Block a user