style: rustfmt

This commit is contained in:
Ryan Leckey 2020-12-19 00:08:29 -08:00
parent 0c08527fc5
commit e9e1dcf78e
No known key found for this signature in database
GPG key ID: F8AA68C235AB08C9
3 changed files with 5 additions and 3 deletions

View file

@ -19,7 +19,9 @@ impl Type<Sqlite> for Uuid {
impl<'q> Encode<'q, Sqlite> for Uuid {
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> 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
}

View file

@ -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<DB> Type<DB> for BString
where

View file

@ -112,7 +112,7 @@ mod bstr {
use super::*;
use sqlx::types::bstr::BString;
test_type!(bstring<BString>(Sqlite,
test_type!(bstring<BString>(Sqlite,
"cast('abc123' as blob)" == BString::from(&b"abc123"[..]),
"x'0001020304'" == BString::from(&b"\x00\x01\x02\x03\x04"[..])
));