Skip to content

Commit b559b98

Browse files
committed
Wrap macros
1 parent cea7423 commit b559b98

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/types/mod.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ macro_rules! to_sql_checked {
3838
ty: &$crate::types::Type,
3939
out: &mut ::std::vec::Vec<u8>,
4040
ctx: &$crate::types::SessionInfo)
41-
-> ::std::result::Result<$crate::types::IsNull, Box<::std::error::Error + ::std::marker::Sync + ::std::marker::Send>> {
41+
-> ::std::result::Result<$crate::types::IsNull,
42+
Box<::std::error::Error +
43+
::std::marker::Sync +
44+
::std::marker::Send>> {
4245
$crate::types::__to_sql_checked(self, ty, out, ctx)
4346
}
4447
}
@@ -411,7 +414,10 @@ impl FromSql for String {
411414
macro_rules! simple_from {
412415
($t:ty, $f:ident, $($expected:pat),+) => {
413416
impl FromSql for $t {
414-
fn from_sql(_: &Type, raw: &[u8], _: &SessionInfo) -> Result<$t, Box<Error + Sync + Send>> {
417+
fn from_sql(_: &Type,
418+
raw: &[u8],
419+
_: &SessionInfo)
420+
-> Result<$t, Box<Error + Sync + Send>> {
415421
types::$f(raw)
416422
}
417423

@@ -706,7 +712,11 @@ impl ToSql for String {
706712
macro_rules! simple_to {
707713
($t:ty, $f:ident, $($expected:pat),+) => {
708714
impl ToSql for $t {
709-
fn to_sql(&self, _: &Type, w: &mut Vec<u8>, _: &SessionInfo) -> Result<IsNull, Box<Error + Sync + Send>> {
715+
fn to_sql(&self,
716+
_: &Type,
717+
w: &mut Vec<u8>,
718+
_: &SessionInfo)
719+
-> Result<IsNull, Box<Error + Sync + Send>> {
710720
types::$f(*self, w);
711721
Ok(IsNull::No)
712722
}

0 commit comments

Comments
 (0)