Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax ToSql bounds #953

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions postgres-derive/src/tosql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ pub fn expand_derive_tosql(input: DeriveInput) -> Result<TokenStream, Error> {
fn accepts(type_: &postgres_types::Type) -> bool {
#accepts_body
}

postgres_types::to_sql_checked!();
}
};

Expand Down
1 change: 0 additions & 1 deletion postgres-types/src/bit_vec_06.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ impl ToSql for BitVec {
}

accepts!(BIT, VARBIT);
to_sql_checked!();
}
6 changes: 0 additions & 6 deletions postgres-types/src/chrono_04.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ impl ToSql for NaiveDateTime {
}

accepts!(TIMESTAMP);
to_sql_checked!();
}

impl<'a> FromSql<'a> for DateTime<Utc> {
Expand All @@ -53,7 +52,6 @@ impl ToSql for DateTime<Utc> {
}

accepts!(TIMESTAMPTZ);
to_sql_checked!();
}

impl<'a> FromSql<'a> for DateTime<Local> {
Expand All @@ -75,7 +73,6 @@ impl ToSql for DateTime<Local> {
}

accepts!(TIMESTAMPTZ);
to_sql_checked!();
}

impl<'a> FromSql<'a> for DateTime<FixedOffset> {
Expand All @@ -100,7 +97,6 @@ impl ToSql for DateTime<FixedOffset> {
}

accepts!(TIMESTAMPTZ);
to_sql_checked!();
}

impl<'a> FromSql<'a> for NaiveDate {
Expand All @@ -127,7 +123,6 @@ impl ToSql for NaiveDate {
}

accepts!(DATE);
to_sql_checked!();
}

impl<'a> FromSql<'a> for NaiveTime {
Expand All @@ -151,5 +146,4 @@ impl ToSql for NaiveTime {
}

accepts!(TIME);
to_sql_checked!();
}
2 changes: 0 additions & 2 deletions postgres-types/src/cidr_02.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ impl ToSql for IpCidr {
}

accepts!(CIDR);
to_sql_checked!();
}

impl<'a> FromSql<'a> for IpInet {
Expand All @@ -40,5 +39,4 @@ impl ToSql for IpInet {
}

accepts!(INET);
to_sql_checked!();
}
1 change: 0 additions & 1 deletion postgres-types/src/eui48_04.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ impl ToSql for MacAddress {
}

accepts!(MACADDR);
to_sql_checked!();
}
1 change: 0 additions & 1 deletion postgres-types/src/eui48_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ impl ToSql for MacAddress {
}

accepts!(MACADDR);
to_sql_checked!();
}
3 changes: 0 additions & 3 deletions postgres-types/src/geo_types_06.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impl ToSql for Point<f64> {
}

accepts!(POINT);
to_sql_checked!();
}

impl<'a> FromSql<'a> for Rect<f64> {
Expand All @@ -44,7 +43,6 @@ impl ToSql for Rect<f64> {
}

accepts!(BOX);
to_sql_checked!();
}

impl<'a> FromSql<'a> for LineString<f64> {
Expand All @@ -68,5 +66,4 @@ impl ToSql for LineString<f64> {
}

accepts!(PATH);
to_sql_checked!();
}
3 changes: 0 additions & 3 deletions postgres-types/src/geo_types_07.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impl ToSql for Point<f64> {
}

accepts!(POINT);
to_sql_checked!();
}

impl<'a> FromSql<'a> for Rect<f64> {
Expand All @@ -44,7 +43,6 @@ impl ToSql for Rect<f64> {
}

accepts!(BOX);
to_sql_checked!();
}

impl<'a> FromSql<'a> for LineString<f64> {
Expand All @@ -68,5 +66,4 @@ impl ToSql for LineString<f64> {
}

accepts!(PATH);
to_sql_checked!();
}
Loading