From d2dcc2d9871390ff3d0bf72e5f918e4ae3165093 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sun, 4 Oct 2020 07:38:52 +0200 Subject: [PATCH 1/2] Fix clippy warning --- src/types/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/types/mod.rs b/src/types/mod.rs index 2d163cf..cca2c40 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -229,10 +229,7 @@ mod test { #[allow(clippy::cognitive_complexity)] fn test_mismatched_types() { fn is_invalid_column_type(err: Error) -> bool { - match err { - Error::InvalidColumnType(..) => true, - _ => false, - } + matches!(err, Error::InvalidColumnType(..)) } let db = checked_memory_handle(); From 799b5d3f7b8961bda6be8b57ca0280191e6afd92 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sun, 4 Oct 2020 07:39:35 +0200 Subject: [PATCH 2/2] Rustfmt --- src/types/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/types/mod.rs b/src/types/mod.rs index cca2c40..85d8ef2 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -17,7 +17,9 @@ //! [datetime](https://www.sqlite.org/lang_datefunc.html) functions. If you //! want different storage for datetimes, you can use a newtype. //! -#![cfg_attr(feature = "time", doc = r##" +#![cfg_attr( + feature = "time", + doc = r##" For example, to store datetimes as `i64`s counting the number of seconds since the Unix epoch: @@ -42,7 +44,8 @@ impl ToSql for DateTimeSql { } ``` -"##)] +"## +)] //! `ToSql` and `FromSql` are also implemented for `Option` where `T` //! implements `ToSql` or `FromSql` for the cases where you want to know if a //! value was NULL (which gets translated to `None`).