Skip to content

Commit df2f37d

Browse files
committed
Remove unecessary alias for Timestamp
1 parent 6de0fce commit df2f37d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

postgres-types/src/jiff_01.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use bytes::BytesMut;
22
use jiff_01::{
33
civil::{Date, DateTime, Time},
44
tz::TimeZone,
5-
Span, Timestamp as JiffTimestamp, Zoned,
5+
Span, Timestamp, Zoned,
66
};
77
use postgres_protocol::types;
88
use std::error::Error;
@@ -32,8 +32,8 @@ impl ToSql for DateTime {
3232
to_sql_checked!();
3333
}
3434

35-
impl<'a> FromSql<'a> for JiffTimestamp {
36-
fn from_sql(type_: &Type, raw: &[u8]) -> Result<JiffTimestamp, Box<dyn Error + Sync + Send>> {
35+
impl<'a> FromSql<'a> for Timestamp {
36+
fn from_sql(type_: &Type, raw: &[u8]) -> Result<Timestamp, Box<dyn Error + Sync + Send>> {
3737
Ok(DateTime::from_sql(type_, raw)?
3838
.to_zoned(TimeZone::UTC)?
3939
.timestamp())
@@ -42,7 +42,7 @@ impl<'a> FromSql<'a> for JiffTimestamp {
4242
accepts!(TIMESTAMPTZ);
4343
}
4444

45-
impl ToSql for JiffTimestamp {
45+
impl ToSql for Timestamp {
4646
fn to_sql(&self, _: &Type, w: &mut BytesMut) -> Result<IsNull, Box<dyn Error + Sync + Send>> {
4747
types::timestamp_to_sql(
4848
self.since(base().to_zoned(TimeZone::UTC)?)?
@@ -58,7 +58,7 @@ impl ToSql for JiffTimestamp {
5858

5959
impl<'a> FromSql<'a> for Zoned {
6060
fn from_sql(type_: &Type, raw: &[u8]) -> Result<Zoned, Box<dyn Error + Sync + Send>> {
61-
Ok(JiffTimestamp::from_sql(type_, raw)?.to_zoned(TimeZone::UTC))
61+
Ok(Timestamp::from_sql(type_, raw)?.to_zoned(TimeZone::UTC))
6262
}
6363

6464
accepts!(TIMESTAMPTZ);

0 commit comments

Comments
 (0)