Skip to content

Commit c2a755d

Browse files
committed
Remove superfluous impls
~foo will coerce to &foo
1 parent d7865cd commit c2a755d

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

types/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -439,13 +439,6 @@ to_option_impl!(PgFloat4, f32)
439439
to_conversions_impl!(PgFloat8, f64, write_be_f64)
440440
to_option_impl!(PgFloat8, f64)
441441

442-
impl ToSql for ~str {
443-
fn to_sql(&self, ty: PostgresType) -> (Format, Option<~[u8]>) {
444-
check_types!(PgVarchar | PgText | PgCharN, ty)
445-
(Text, Some(self.as_bytes().to_owned()))
446-
}
447-
}
448-
449442
impl<'self> ToSql for &'self str {
450443
fn to_sql(&self, ty: PostgresType) -> (Format, Option<~[u8]>) {
451444
check_types!(PgVarchar | PgText | PgCharN, ty)
@@ -456,13 +449,6 @@ impl<'self> ToSql for &'self str {
456449
to_option_impl!(PgVarchar | PgText | PgCharN, ~str)
457450
to_option_impl!(self, PgVarchar | PgText | PgCharN, &'self str)
458451

459-
impl ToSql for ~[u8] {
460-
fn to_sql(&self, ty: PostgresType) -> (Format, Option<~[u8]>) {
461-
check_types!(PgByteA, ty)
462-
(Binary, Some(self.to_owned()))
463-
}
464-
}
465-
466452
impl<'self> ToSql for &'self [u8] {
467453
fn to_sql(&self, ty: PostgresType) -> (Format, Option<~[u8]>) {
468454
check_types!(PgByteA, ty)

0 commit comments

Comments
 (0)