@@ -488,14 +488,14 @@ impl FromSql for HashMap<String, Option<String>> {
488488}
489489
490490/// A trait for types that can be converted into Postgres values
491- pub trait ToSql {
491+ pub trait ToSql for Sized ? {
492492 /// Converts the value of `self` into the binary format appropriate for the
493493 /// Postgres backend.
494494 fn to_sql ( & self , ty : & PostgresType ) -> PostgresResult < Option < Vec < u8 > > > ;
495495}
496496
497497#[ doc( hidden) ]
498- trait RawToSql {
498+ trait RawToSql for Sized ? {
499499 fn raw_to_sql < W : Writer > ( & self , w : & mut W ) -> PostgresResult < ( ) > ;
500500}
501501
@@ -660,7 +660,7 @@ to_raw_to_impl!(PgInt4Range, Range<i32>)
660660to_raw_to_impl ! ( PgInt8Range , Range <i64 >)
661661to_raw_to_impl ! ( PgTsRange | PgTstzRange , Range <Timespec >)
662662
663- impl < ' a > ToSql for & ' a str {
663+ impl < ' a > ToSql for str {
664664 fn to_sql ( & self , ty : & PostgresType ) -> PostgresResult < Option < Vec < u8 > > > {
665665 check_types ! ( PgVarchar | PgText | PgCharN | PgName , ty)
666666 Ok ( Some ( self . as_bytes ( ) . to_vec ( ) ) )
@@ -669,7 +669,7 @@ impl<'a> ToSql for &'a str {
669669
670670to_option_impl_lifetime ! ( PgVarchar | PgText | PgCharN | PgName , & ' a str )
671671
672- impl < ' a > ToSql for & ' a [ u8 ] {
672+ impl < ' a > ToSql for [ u8 ] {
673673 fn to_sql ( & self , ty : & PostgresType ) -> PostgresResult < Option < Vec < u8 > > > {
674674 check_types ! ( PgByteA , ty)
675675 Ok ( Some ( self . to_vec ( ) ) )
0 commit comments