From e9e1dcf78ee990381180cd7ade86fe837b9823f7 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sat, 19 Dec 2020 00:08:29 -0800 Subject: [PATCH] style: rustfmt --- sqlx-core/src/sqlite/types/uuid.rs | 4 +++- sqlx-core/src/types/bstr.rs | 2 +- tests/sqlite/types.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sqlx-core/src/sqlite/types/uuid.rs b/sqlx-core/src/sqlite/types/uuid.rs index 0634a809..272f58bf 100644 --- a/sqlx-core/src/sqlite/types/uuid.rs +++ b/sqlx-core/src/sqlite/types/uuid.rs @@ -19,7 +19,9 @@ impl Type for Uuid { impl<'q> Encode<'q, Sqlite> for Uuid { fn encode_by_ref(&self, args: &mut Vec>) -> IsNull { - args.push(SqliteArgumentValue::Blob(Cow::Owned(self.as_bytes().to_vec()))); + args.push(SqliteArgumentValue::Blob(Cow::Owned( + self.as_bytes().to_vec(), + ))); IsNull::No } diff --git a/sqlx-core/src/types/bstr.rs b/sqlx-core/src/types/bstr.rs index 976357d3..638e6f85 100644 --- a/sqlx-core/src/types/bstr.rs +++ b/sqlx-core/src/types/bstr.rs @@ -5,7 +5,7 @@ use crate::encode::{Encode, IsNull}; use crate::error::BoxDynError; use crate::types::Type; -pub use bstr::{BString, BStr, ByteSlice}; +pub use bstr::{BStr, BString, ByteSlice}; impl Type for BString where diff --git a/tests/sqlite/types.rs b/tests/sqlite/types.rs index 7d8b8c20..9b13083c 100644 --- a/tests/sqlite/types.rs +++ b/tests/sqlite/types.rs @@ -112,7 +112,7 @@ mod bstr { use super::*; use sqlx::types::bstr::BString; - test_type!(bstring(Sqlite, + test_type!(bstring(Sqlite, "cast('abc123' as blob)" == BString::from(&b"abc123"[..]), "x'0001020304'" == BString::from(&b"\x00\x01\x02\x03\x04"[..]) ));